Hello ~ This problem has me puzzled. When users login to my rails app I have the session set up to be stored in the MySQL database for the app. Intermittently, users will get the following error: no marshal_dump is defined for class Proc D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/session/active_record_store.rb:81:in `dump'' D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/session/active_record_store.rb:81:in `marshal'' D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/session/active_record_store.rb:133:in `marshal_data!'' D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/callbacks.rb:333:in `callback'' D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/callbacks.rb:330:in `callback'' D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/callbacks.rb:248:in `create_or_update'' D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/base.rb:1388:in `save_without_validation'' D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/validations.rb:724:in `save_without_transactions'' D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/transactions.rb:126:in `save'' D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/connection_adapters/abstract/database_statements.rb:51:in `transaction'' D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/transactions.rb:91:in `transaction'' D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/transactions.rb:118:in `transaction'' D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/transactions.rb:126:in `save'' D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/session/active_record_store.rb:307:in `update'' D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/base.rb:794:in `silence'' D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/session/active_record_store.rb:307:in `update'' D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/session/active_record_store.rb:314:in `close'' D:/apps/xampp/ruby/lib/ruby/1.8/cgi/session.rb:330:in `close'' D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/base.rb:982:in `close_session'' D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/base.rb:1024:in `process_cleanup_without_flash'' D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/flash.rb:147:in `process_cleanup_without_filters'' D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/filters.rb:426:in `process_cleanup_without_session_management_support'' D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/session_management.rb:126:in `process_cleanup_without_components'' D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/components.rb:182:in `process_cleanup'' D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/base.rb:383:in `process_without_filters'' D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/filters.rb:364:in `process_without_session_management_support'' D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/session_management.rb:117:in `process'' D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/dispatcher.rb:38:in `dispatch'' D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/fcgi_handler.rb:150:in `process_request'' D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/fcgi_handler.rb:54:in `process!'' D:/apps/xampp/ruby/lib/ruby/site_ruby/1.8/fcgi.rb:598:in `each_cgi'' D:/apps/xampp/ruby/lib/ruby/site_ruby/1.8/fcgi.rb:595:in `each_cgi'' D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/fcgi_handler.rb:53:in `process!'' D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/fcgi_handler.rb:23:in `process!'' D:/Data/web/remw/advocate/public/dispatch.fcgi:24 I have had this happen in Windows running in development mode and on Linux running in production. Any ideas or potential pointers would be greatly appreciated. Thx, Ben -- Ben Reubenstein http://www.benr75.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060403/756e373e/attachment.html
Ben- You cannot marshal objects that have procs or lambdas in them. Its a current limitation of the ruby interpreter. What exactly are you storing in the session? Whole objects? Or just id''s? SHow me what you are storing in the session and I can help you figure it out. CHeers- -Ezra On Apr 3, 2006, at 2:58 PM, Ben Reubenstein wrote:> Hello ~ > > This problem has me puzzled. When users login to my rails app I > have the session set up to be stored in the MySQL database for the > app. Intermittently, users will get the following error: > > no marshal_dump is defined for class Proc > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/ > action_controller/session/active_record_store.rb:81:in `dump'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/ > action_controller/session/active_record_store.rb:81:in `marshal'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/ > action_controller/session/active_record_store.rb:133:in > `marshal_data!'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/ > active_record/callbacks.rb:333:in `callback'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/ > active_record/callbacks.rb:330:in `callback'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/ > active_record/callbacks.rb:248:in `create_or_update'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/ > active_record/base.rb:1388:in `save_without_validation'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/ > active_record/validations.rb:724:in `save_without_transactions'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/ > active_record/transactions.rb:126:in `save'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/ > active_record/connection_adapters/abstract/database_statements.rb: > 51:in `transaction'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/ > active_record/transactions.rb:91:in `transaction'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/ > active_record/transactions.rb:118:in `transaction'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/ > active_record/transactions.rb:126:in `save'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/ > action_controller/session/active_record_store.rb:307:in `update'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/ > active_record/base.rb:794:in `silence'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/ > action_controller/session/active_record_store.rb:307:in `update'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/ > action_controller/session/active_record_store.rb:314:in `close'' > D:/apps/xampp/ruby/lib/ruby/1.8/cgi/session.rb:330:in `close'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack- 1.12.0/lib/ > action_controller/base.rb:982:in `close_session'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/ > action_controller/base.rb:1024:in `process_cleanup_without_flash'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack- 1.12.0/lib/ > action_controller/flash.rb:147:in `process_cleanup_without_filters'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/ > action_controller/filters.rb:426:in > `process_cleanup_without_session_management_support'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/ > action_controller/session_management.rb:126:in > `process_cleanup_without_components'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/ > action_controller/components.rb:182:in `process_cleanup'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/ > action_controller/base.rb:383:in `process_without_filters'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/ > action_controller/filters.rb:364:in > `process_without_session_management_support'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/ > action_controller/session_management.rb:117:in `process'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/ > dispatcher.rb:38:in `dispatch'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/rails- 1.1.0/lib/ > fcgi_handler.rb:150:in `process_request'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/ > fcgi_handler.rb:54:in `process!'' > D:/apps/xampp/ruby/lib/ruby/site_ruby/1.8/fcgi.rb:598:in `each_cgi'' > D:/apps/xampp/ruby/lib/ruby/site_ruby/1.8/fcgi.rb:595:in `each_cgi'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/ > fcgi_handler.rb:53:in `process!'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/ > fcgi_handler.rb:23:in `process!'' > D:/Data/web/remw/advocate/public/dispatch.fcgi:24 > > I have had this happen in Windows running in development mode and > on Linux running in production. Any ideas or potential pointers > would be greatly appreciated. > > Thx, > > Ben > > -- > Ben Reubenstein > http://www.benr75.com > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060403/a72bedad/attachment.html
Hi Ezra ~ Thx for the tip. I was storing an entire object, but after much consideration decided it was overkill and a potential security risk to store the object in the session. I adjusted my app to only store some key elements in the session, and voila! Thx again, Ben On 4/3/06, Ezra Zygmuntowicz <ezmobius@gmail.com> wrote:> > Ben- > You cannot marshal objects that have procs or lambdas in them. Its a > current limitation of the ruby interpreter. What exactly are you storing in > the session? Whole objects? Or just id''s? SHow me what you are storing in > the session and I can help you figure it out. > > CHeers- > -Ezra > > On Apr 3, 2006, at 2:58 PM, Ben Reubenstein wrote: > > Hello ~ > > This problem has me puzzled. When users login to my rails app I have the > session set up to be stored in the MySQL database for the app. > Intermittently, users will get the following error: > > no marshal_dump is defined for class Proc > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/session/active_record_store.rb:81:in > `dump'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/session/active_record_store.rb:81:in > `marshal'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/session/active_record_store.rb:133:in > `marshal_data!'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/callbacks.rb:333:in > `callback'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/callbacks.rb:330:in > `callback'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/callbacks.rb:248:in > `create_or_update'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/base.rb:1388:in > `save_without_validation'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/validations.rb:724:in > `save_without_transactions'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/transactions.rb:126:in > `save'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/connection_adapters/abstract/database_statements.rb:51:in > `transaction'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/transactions.rb:91:in > `transaction'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/transactions.rb:118:in > `transaction'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/transactions.rb:126:in > `save'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/session/active_record_store.rb:307:in > `update'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/base.rb:794:in > `silence'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/session/active_record_store.rb:307:in > `update'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/session/active_record_store.rb:314:in > `close'' > D:/apps/xampp/ruby/lib/ruby/1.8/cgi/session.rb:330:in `close'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack- 1.12.0/lib/action_controller/base.rb:982:in > `close_session'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/base.rb:1024:in > `process_cleanup_without_flash'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack- 1.12.0/lib/action_controller/flash.rb:147:in > `process_cleanup_without_filters'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/filters.rb:426:in > `process_cleanup_without_session_management_support'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/session_management.rb:126:in > `process_cleanup_without_components'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/components.rb:182:in > `process_cleanup'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/base.rb:383:in > `process_without_filters'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/filters.rb:364:in > `process_without_session_management_support'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/session_management.rb:117:in > `process'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/dispatcher.rb:38:in > `dispatch'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/rails- 1.1.0/lib/fcgi_handler.rb:150:in > `process_request'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/fcgi_handler.rb:54:in > `process!'' > D:/apps/xampp/ruby/lib/ruby/site_ruby/1.8/fcgi.rb:598:in `each_cgi'' > D:/apps/xampp/ruby/lib/ruby/site_ruby/1.8/fcgi.rb:595:in `each_cgi'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/fcgi_handler.rb:53:in > `process!'' > D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/fcgi_handler.rb:23:in > `process!'' > D:/Data/web/remw/advocate/public/dispatch.fcgi:24 > > I have had this happen in Windows running in development mode and on Linux > running in production. Any ideas or potential pointers would be greatly > appreciated. > > Thx, > > Ben > > -- > Ben Reubenstein > http://www.benr75.com > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > >-- Ben Reubenstein http://www.benr75.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060407/6da74939/attachment-0001.html