# Rails Edge ActiveSupport::TimeWithZone and Marshalled objects

**URL:** <https://www.ruby-forum.com/t/rails-edge-activesupport-timewithzone-and-marshalled-objects/129664>\
**Category:** Rails\
**Created:** [February 20, 2008, 2:33pm UTC](https://www.ruby-forum.com/t/rails-edge-activesupport-timewithzone-and-marshalled-objects/129664 "2008-02-20T14:33:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sev2](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/65b543/32.png) [@sev2](https://www.ruby-forum.com/u/sev2)\
**Post date:** [February 20, 2008, 2:33pm UTC](https://www.ruby-forum.com/t/rails-edge-activesupport-timewithzone-and-marshalled-objects/129664/1 "2008-02-20T14:33:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sev2](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/65b543/32.png) [@sev2](https://www.ruby-forum.com/u/sev2)\
**Post date:** [February 28, 2008, 12:02am UTC](https://www.ruby-forum.com/t/rails-edge-activesupport-timewithzone-and-marshalled-objects/129664/2 "2008-02-28T00:02:31Z")

</div>

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](http://dev.rubyonrails.org/ticket/11005).

Any help is very appreciated.

Brad

---

<div class="post-metadata">

**Author:** ![sev2](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/65b543/32.png) [@sev2](https://www.ruby-forum.com/u/sev2)\
**Post date:** [March 4, 2008, 2:35am UTC](https://www.ruby-forum.com/t/rails-edge-activesupport-timewithzone-and-marshalled-objects/129664/3 "2008-03-04T02:35:28Z")

</div>

I added TimeWithZone #marshal\_dump and #marshal\_load in changeset  
[8975]; please let me know if you’re still having issues.
