High Tech Sorcery

Rails marshal data too short

by on Mar.15, 2011, under Ruby On Rails

I ran into an error when trying to save an object in flash between Rails actions.  I’m still not sure why marshal data too short happened as the session storage is mysql using the text type which should be 64kb.  I can’t imagine the object taking more size than that but it would be worth checking.  I resolved the issue by not storing the object but other options would be figuring out why the object is so large (Marshal.dump(object) maybe) or switching to mediumtext type which has a limit of 16MB.  To do this via a migration can be found here:

ruby on rails – marshal data too short!!! – Stack Overflow


Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Blogroll

A few highly recommended websites...