Ruby on Rails TypeError

我一直在使用ruby on rails应用程序并在执行任何操作时遇到以下错误,包括安装gem,更新bundle,安装bundle。

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

我已经卸载了RVM并完全删除了它的所有文件,然后尝试安装gem,但仍然得到相同的错误。

我有这个确切的问题,我花了很长时间才弄明白。 为了解决这个问题,我运行了以下命令:

 bundle install --full-index 

我的猜测是,在我的计算机锁定后,我最终得到了一个损坏的rubygems索引,这个命令强制重新下载索引。

希望这有助于遇到这种情况的人。

将gemfile中的源更改为:

 source 'https://rubygems.org' 

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

Interesting Posts