Hello all, I''m trying to use the new ActiveSupport::TimeWithZone from Edge. The problem seems to be that I have a several-action process to create a Booking. This Booking is stored in the session (session[:booking] @booking) throughout the actions until the last action is reached and the record is saved to the DB. Using TimeWithZone seems to be producing errors when trying to unmarshal the Booking back from the users session, giving me: Status: 500 Internal Server Error class ActiveSupport::TimeWithZone needs to have method `_load'' /Users/alistair/gresfordtrust/vendor/rails/actionpack/lib/ action_controller/session/active_record_store.rb:83:in `load'' /Users/alistair/gresfordtrust/vendor/rails/actionpack/lib/ action_controller/session/active_record_store.rb:83:in `unmarshal'' /Users/alistair/gresfordtrust/vendor/rails/actionpack/lib/ action_controller/session/active_record_store.rb:121:in `data'' /Users/alistair/gresfordtrust/vendor/rails/actionpack/lib/ action_controller/session/active_record_store.rb:302:in `restore'' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ ruby/1.8/cgi/session.rb:304:in `[]'' .. etc... Anyone have any ideas how I can get around this? Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Brad Bennett
2008-Feb-27 23:00 UTC
Re: Rails Edge ActiveSupport::TimeWithZone and Marshalled objects
I have the exact same error using edge. Does anyone have any insight into this? I found a couple of people having issues with ActiveRecord::Base''s _load method: http://dev.rubyonrails.org/ticket/11005. Any help is very appreciated. Brad On Feb 20, 5:32 am, sev2 <alistairh...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello all, > > I''m trying to use the new ActiveSupport::TimeWithZone from Edge. The > problem seems to be that I have a several-action process to create a > Booking. This Booking is stored in the session (session[:booking] > @booking) throughout the actions until the last action is reached and > the record is saved to the DB. > > Using TimeWithZone seems to be producing errors when trying to > unmarshal the Booking back from the users session, giving me: > > Status: 500 Internal Server Error > class ActiveSupport::TimeWithZone needs to have method `_load'' > /Users/alistair/gresfordtrust/vendor/rails/actionpack/lib/ > action_controller/session/active_record_store.rb:83:in `load'' > /Users/alistair/gresfordtrust/vendor/rails/actionpack/lib/ > action_controller/session/active_record_store.rb:83:in `unmarshal'' > /Users/alistair/gresfordtrust/vendor/rails/actionpack/lib/ > action_controller/session/active_record_store.rb:121:in `data'' > /Users/alistair/gresfordtrust/vendor/rails/actionpack/lib/ > action_controller/session/active_record_store.rb:302:in `restore'' > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ > ruby/1.8/cgi/session.rb:304:in `[]'' > > .. etc... > > Anyone have any ideas how I can get around this? > > Thanks--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Geoff Buesing
2008-Mar-04 01:35 UTC
Re: Rails Edge ActiveSupport::TimeWithZone and Marshalled objects
I added TimeWithZone #marshal_dump and #marshal_load in changeset [8975]; please let me know if you''re still having issues. On Feb 20, 7:32 am, sev2 <alistairh...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello all, > > I''m trying to use the new ActiveSupport::TimeWithZonefrom Edge. The > problem seems to be that I have a several-action process to create a > Booking. This Booking is stored in the session (session[:booking] > @booking) throughout the actions until the last action is reached and > the record is saved to the DB. > > UsingTimeWithZoneseems to be producing errors when trying to > unmarshal the Booking back from the users session, giving me: > > Status: 500 Internal Server Error > class ActiveSupport::TimeWithZoneneeds to have method `_load'' > /Users/alistair/gresfordtrust/vendor/rails/actionpack/lib/ > action_controller/session/active_record_store.rb:83:in `load'' > /Users/alistair/gresfordtrust/vendor/rails/actionpack/lib/ > action_controller/session/active_record_store.rb:83:in `unmarshal'' > /Users/alistair/gresfordtrust/vendor/rails/actionpack/lib/ > action_controller/session/active_record_store.rb:121:in `data'' > /Users/alistair/gresfordtrust/vendor/rails/actionpack/lib/ > action_controller/session/active_record_store.rb:302:in `restore'' > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ > ruby/1.8/cgi/session.rb:304:in `[]'' > > .. etc... > > Anyone have any ideas how I can get around this? > > Thanks--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---