Deserializing an object failed in ActiveRecord
This can happen when the rails dependency system doesn’t load the serialize referenced objects before deserialize happens. We killed some time figuring this out – here is what you can do if you see any such issue:
For example:
The following code could create deserialization errors when Employee object is loaded.
class Employee < ActiveRecord::Base
serialize :job_roles
[...]
Ruby on Rails: Serializing and DeSerializing Ruby objects
Serialization in Ruby comes very handy at times, it really helps in several cases especially when dealing with:
persisting Ruby objects onto a disk or to the database
transferring the Ruby objects over the network
session persistence
complex data structure storing in the database with ActiveRecord
and lot more …
The Object Serialization can be done in Ruby in two [...]


