Ar - rollback on staging/production - whats causing it?


i;m using a easy feedback plugin which works just fine - locally.

uploading the app to staging production gives me this:

rollback_active_record_state!' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:196:insave’

the create method is basically this:

def create
@feedback =[:feedback])
if logged_in?
@feedback.user_id =

if @feedback.valid?
    FeedbackMailer.deliver_feedback(@feedback) if 

render :status => :created, :text => ‘

Thank you for your

@error_message = “Please enter your
render :action => ‘new’, :status => :unprocessable_entity


validation is only on one field, which has a value in the params-hash.
model-validations etc are all the same - locally vs server

any ideas?

On Wednesday, May 18, 2011 1:32:39 PM UTC-6, der_tom wrote:




Well, that’s the top of the stack-trace but the actual exception and its
message is?

[email protected]?

validation is only on one field, which has a value in the params-hash.
model-validations etc are all the same - locally vs server

any ideas?

Well, since the code in your action looks simple enough and since we
the error is raised on the call, then I’d focus on why it
can’t save. The upshot is that we need more info to help you. What were
values submitted to the action (in the params hash) by the request that
failed? What was the actual exception and error message (it’s nice you
provided stack trace but we need this too). What is this validation’s
the one you said the model has “on one field”? What else might be
in your environment between your development and staging production?
Does it
succeed in production mode on your dev workstation, meaning the problem
specific to where it’s deployed, not the mode? Or, does it always fail
production, regardless of where it’s deployed?



here are the missing info:

Processing FeedbacksController#create (for at 2011-05-20
09:26:51) [POST]
Parameters: {“commit”=>“Send”,
“feedback”=>{“comment”=>“test”, “subject”=>“Suggestion”,
“email”=>“[email protected]”}, “_”=>""}
Sent mail to [email protected]

NoMethodError (undefined method delete' for nil:NilClass): app/controllers/feedbacks_controller.rb:22:increate’
passenger (3.0.2)
lib/phusion_passenger/rack/request_handler.rb:96:in process_request' passenger (3.0.2) lib/phusion_passenger/abstract_request_handler.rb:513:inaccept_and_process_next_request’
passenger (3.0.2)
lib/phusion_passenger/abstract_request_handler.rb:274:in main_loop' passenger (3.0.2) lib/phusion_passenger/classic_rails/application_spawner.rb:321:instart_request_handler’
passenger (3.0.2)
send' passenger (3.0.2) lib/phusion_passenger/classic_rails/application_spawner.rb:275:inhandle_spawn_application’
passenger (3.0.2) lib/phusion_passenger/utils.rb:479:in safe_fork' passenger (3.0.2) lib/phusion_passenger/classic_rails/application_spawner.rb:270:inhandle_spawn_application’
passenger (3.0.2) lib/phusion_passenger/abstract_server.rb:357:in
__send__' passenger (3.0.2) lib/phusion_passenger/abstract_server.rb:357:inserver_main_loop’
passenger (3.0.2) lib/phusion_passenger/abstract_server.rb:206:in
start_synchronously' passenger (3.0.2) lib/phusion_passenger/abstract_server.rb:180:instart’
passenger (3.0.2)
start' passenger (3.0.2) lib/phusion_passenger/spawn_manager.rb:219:inspawn_rails_application’
passenger (3.0.2)
lookup_or_add' passenger (3.0.2) lib/phusion_passenger/spawn_manager.rb:214:inspawn_rails_application’
passenger (3.0.2)
synchronize' passenger (3.0.2) lib/phusion_passenger/abstract_server_collection.rb:79:insynchronize’
passenger (3.0.2) lib/phusion_passenger/spawn_manager.rb:213:in
spawn_rails_application' passenger (3.0.2) lib/phusion_passenger/spawn_manager.rb:132:inspawn_application’
passenger (3.0.2) lib/phusion_passenger/spawn_manager.rb:275:in
handle_spawn_application' passenger (3.0.2) lib/phusion_passenger/abstract_server.rb:357:insend
passenger (3.0.2) lib/phusion_passenger/abstract_server.rb:357:in
server_main_loop' passenger (3.0.2) lib/phusion_passenger/abstract_server.rb:206:instart_synchronously’
passenger (3.0.2) helper-scripts/passenger-spawn-server:99

any ideas? i really appreciate it

On 20 May 2011 08:33, tom [email protected] wrote:

“email”=>“[email protected]”}, “_”=>""}
Sent mail to [email protected]

NoMethodError (undefined method delete' for nil:NilClass): app/controllers/feedbacks_controller.rb:22:increate’

The clue is in the error message. At the above line you are
presumably calling delete, though that seems a bit odd in create. The
object you are calling delete on is nil.



think the best is to use debugger and see what happening here


On May 20, 2011, at 19:19 , tom wrote:

To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at

Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache

yes and no - im not calling delete ‘manually’ nor do i have coded it
into the create method. to me it seems the rollback is doing this, as
far as i can trace back the code.
anyhow - thx

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs