Ruby on Rails TypeError

倾然丶 夕夏残阳落幕 提交于 2019-12-10 16:08:32

问题


I have been working on a ruby on rails application and ran into the following error when doing just about anything, including installing a gem, updating the bundle, installing the bundle.

ERROR: While executing gem ... (TypeError) incompatible marshal file format (can't be read) format version 4.8 required; 31.139 given

I have uninstalled RVM and completely removed all files from it, then tried to install a gem, but still get the same error.


回答1:


I had this exact problem, and it took me forever to figure it out. To fix it, I ran the following command:

bundle install --full-index

My guess is that I ended up with a corrupted rubygems index after my computer locked up, and this command forces a fresh download of the index.

Hopefully this helps someone who runs into this.




回答2:


Change the source in your gemfile to:

source 'https://rubygems.org'

https://github.com/grosser/parallel_tests/pull/183



来源:https://stackoverflow.com/questions/6201899/ruby-on-rails-typeerror

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