search for: unserialize_attribut

Displaying 4 results from an estimated 4 matches for "unserialize_attribut".

Did you mean: unserialize_attribute
2007 Feb 18
2
SerializationTypeMismatch in Production Mode
In production mode, I keep getting this error the 2nd time it loads a page with a serialized attribute: ActiveRecord::SerializationTypeMismatch (answers_container was supposed to be a Array, but was a NilClass): /vendor/rails/activerecord/lib/active_record/base.rb:1964:in `unserialize_attribute'' In development, it works fine. In fact, if I set to false config.cache_classes in production.rb, it works fine. The first time you hit the page, it works fine. Upon refresh, it returns that error. This happens with both webbrick and litespeed. The controller code is: def new sto...
2007 Apr 18
0
catching frozen hashes
...y up in the active record ancestery chain. Here''s the first entries in the error output: /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:1877:in `[]='' /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:1877:in `unserialize_attribute'' /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:1803:in `read_attribute'' /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:1489:in `[]'' Also, I know you can test to see if a hash is frozen by using t...
2008 Jul 08
0
Bug with serialized columns in console ?
...in the console window : >> s=Server.find_by_nom "a_server" ActiveRecord::SerializationTypeMismatch: visa was supposed to be a Hash, but was a String from D:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/ activerecord-2.0.2/lib/active_record/attribute_methods.rb:244:i n `unserialize_attribute'' from D:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/ activerecord-2.0.2/lib/active_record/attribute_methods.rb:216:i n `read_attribute'' from D:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/ activerecord-2.0.2/lib/active_record/base.rb:2152:in `attribute...
2007 Mar 29
1
ActiveRecord attributes -- strange behavior when adding Array to an element
Hi, I have a database table and associated ActiveRecord model. I was trying to store (temporarily) an array in one of the attribute elements - not to save it, but just so that I can keep some form data in a sensible place. A stripped down version of the problem I''m having is: p = Property.new(:bedroom_count => ["2","3"]) puts p.inspect # ==> will correctly show