On 15 Nov 2008, at 05:47, John Hohlen wrote:
> > The error below has been encountered using both Rails 2.1.1 and 2.1.2. > > I have a strange Time Zone / Active Record persistence error that only > occurs on Windows (it works fine on OS X). In addition, it only > occurs > when I run my entire test suite (units). If I only run a single > test, it > works fine. And the code works fine when I run my application on > either > operating system. > > It appears Active Record is trying to serialize the entire > TZInfo::DataTimezone object into the database column when my "user" > object is saved. This results in a "Data too long for column error". > > The time zone field is mapped as a string in the database. I create a > time_zone object in my "user" model object as follows: > > def time_zone_object > ::ActiveSupport::TimeZone[time_zone] > end > If the time_zone attribute is supposed to be a name like "Central Time (US & Canada)" shouldn't you be trying to set it to such a string rather than trying to set it to the actual TimeZone instance? Fred --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

