Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ruby on Rails - incompatible marshal file format

I recently upgraded a Rails v3.x app to Rails 4.1.1 and everything seemed to transition for the most part, but however when I switch the app from production to development in the apache config file, I get the error message We're sorry but something went wrong I know the development environment is working because I can see the GET request being processed in the development.log file. But shortly after the GET request I get the following in the log

ActionView::Template::Error (incompatible marshal file format (can't be read) format version 4.8 required; 123.34 given):

like image 437
ipatch Avatar asked Jun 05 '14 02:06

ipatch


1 Answers

In my case, this error was caused by me playing with the new cookies_serializer option in config\initializers\cookies_serializer.rb.

In development I set it to :json (which meant that my local cookies were serialized as json) but then I removed the option completely and put it in production. If I then ran the server in development again my json serialized cookies resulted in the same error.

So if you have ever run with cookies_serializer set to :hybrid or :json then you will need to carry on running with (at least) :hybrid.

like image 88
zelanix Avatar answered Oct 31 '22 21:10

zelanix