/!\ FAILSAFE /!\ error with Rails 2.3.4

Does anyone know what could be causing this error? I am currently experiencing it when some browser submit a multipart form witha file attached.

Thanks! Tom

/!\ FAILSAFE /!\ Tue Feb 02 13:28:35 -0500 2010   Status: 500 Internal Server Error   no marshal_dump is defined for class Proc     /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/ activesupport-2.3.4/lib/active_support/message_verifier.rb:36:in `dump'     /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/ activesupport-2.3.4/lib/active_support/message_verifier.rb:36:in `generate'     /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/ actionpack-2.3.4/lib/action_controller/session/cookie_store.rb:151:in `marshal'     /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/ actionpack-2.3.4/lib/action_controller/session/cookie_store.rb:100:in `call'     /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/ actionpack-2.3.4/lib/action_controller/failsafe.rb:26:in `call'     /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/ passenger-2.2.4/vendor/rack-1.0.0-git/lib/rack/lock.rb:11:in `call'     /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/ passenger-2.2.4/vendor/rack-1.0.0-git/lib/rack/lock.rb:11:in `synchronize'     /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/ passenger-2.2.4/vendor/rack-1.0.0-git/lib/rack/lock.rb:11:in `call'     /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/ actionpack-2.3.4/lib/action_controller/dispatcher.rb:106:in `call'     /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/ passenger-2.2.4/lib/phusion_passenger/rack/request_handler.rb:91:in `process_request'     /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/ passenger-2.2.4/lib/phusion_passenger/abstract_request_handler.rb: 206:in `main_loop'     /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/ passenger-2.2.4/lib/phusion_passenger/railz/application_spawner.rb: 376:in `start_request_handler'     /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/ passenger-2.2.4/lib/phusion_passenger/railz/application_spawner.rb: 334:in `handle_spawn_application'     /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/ passenger-2.2.4/lib/phusion_passenger/utils.rb:182:in `safe_fork'     /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/ passenger-2.2.4/lib/phusion_passenger/railz/application_spawner.rb: 332:in `handle_spawn_application'     /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/ passenger-2.2.4/lib/phusion_passenger/abstract_server.rb:351:in `__send__'     /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/ passenger-2.2.4/lib/phusion_passenger/abstract_server.rb:351:in `main_loop'     /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/ passenger-2.2.4/lib/phusion_passenger/abstract_server.rb:195:in `start_synchronously'     /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/ passenger-2.2.4/lib/phusion_passenger/abstract_server.rb:162:in `start'     /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/ passenger-2.2.4/lib/phusion_passenger/railz/application_spawner.rb: 213:in `start'     /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/ passenger-2.2.4/lib/phusion_passenger/spawn_manager.rb:261:in `spawn_rails_application'     /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/ passenger-2.2.4/lib/phusion_passenger/abstract_server_collection.rb: 126:in `lookup_or_add'     /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/ passenger-2.2.4/lib/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'     /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/ passenger-2.2.4/lib/phusion_passenger/abstract_server_collection.rb: 80:in `synchronize'     /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/ passenger-2.2.4/lib/phusion_passenger/abstract_server_collection.rb: 79:in `synchronize'     /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/ passenger-2.2.4/lib/phusion_passenger/spawn_manager.rb:254:in `spawn_rails_application'     /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/ passenger-2.2.4/lib/phusion_passenger/spawn_manager.rb:153:in `spawn_application'     /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/ passenger-2.2.4/lib/phusion_passenger/spawn_manager.rb:286:in `handle_spawn_application'     /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/ passenger-2.2.4/lib/phusion_passenger/abstract_server.rb:351:in `__send__'     /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/ passenger-2.2.4/lib/phusion_passenger/abstract_server.rb:351:in `main_loop'     /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/ passenger-2.2.4/lib/phusion_passenger/abstract_server.rb:195:in `start_synchronously'     /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/ passenger-2.2.4/bin/passenger-spawn-server:61

Does anyone know what could be causing this error? I am currently experiencing it when some browser submit a multipart form witha file attached.

Somewhere you are trying to serialize a Proc object (looks like you're trying to put one in the session).

Fred

Interesting! I’ve found the problem, but not the fix. I was store my ActiveRecord errors in the flash as shown below:

flash.now[:errors]= @object.errors

This apparently causes problems when you are using PaperClip and there is a validation issue. It may be trying to put the file in the ActiveRecord Errors object.

I’m just going to have to change how I do my flash error messages…

Thanks!

Tom