Ruby on Rails - incompatible marshal file format

匿名 (未验证) 提交于 2019-12-03 01:33:01

问题:

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):

回答1:

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.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!