search for: serializationtypemismatch

Displaying 5 results from an estimated 5 matches for "serializationtypemismatch".

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...
2009 May 18
0
ActiveRecord SerializationTypeMismatch MySQL SQLite
I was having this error in Development but not in Test: ActiveRecord::SerializationTypeMismatch: cambiable_attributes was supposed to be a Hash, but was a String Which was the problem? I was using MySQL in Development and SQLite3 in Test. Field ''cambiable_attributes'' was type String in the DB schema and had to be type Text. I changed the data type to Text and it worked well...
2010 Dec 08
0
ActiveRecord serialize field and SerializationTypeMismatch
...rstand the documentation correctly this restricts settings to the class MyModelSettings. The problem is that this is so restrictive that I even don''t know how to initialize the field. MyModel.new or even MyModel.new(:settings => MyModelSettings) everything I do leads to ActiveRecord::SerializationTypeMismatch: settings was supposed to be a MyModelSettings, but was a String Where is the correct place to initialize the settings (preferable inside my model)? Regards, Kai -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this g...
2008 Jul 08
0
Bug with serialized columns in console ?
...rything works as expected : Excel exports following the "visa" Hash or "appli" Array are ok. But since I added the visa Hash, I can''t load the record with such a serialized column 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...
2004 Oct 25
1
Rails 0.8: Just shy of 100 additions, changes, tweaks, and fixes!
...ct is retrieved as a descendent of a class not in the hierarchy. Example: class User < ActiveRecord::Base serialize :settings, :class_name => "Hash" end user = User.create("settings" => %w( one two three )) User.find(user.id).settings # => raises SerializationTypeMismatch * Added the option to connect to a different database for one model at a time. Just call establish_connection on the class you want to have connected to another database than Base. This will automatically also connect decendents of that class to the different database [Renald Buter]. * Ad...