Ruby on Rails 类型错误
我一直在开发 ruby on Rails 应用程序,在执行任何操作(包括安装 gem、更新包、安装包)时遇到以下错误。
错误:执行 gem 时...(TypeError) 不兼容的元帅文件格式(无法读取) 需要格式版本 4.8; 31.139给定
我已经卸载了RVM并完全删除了其中的所有文件,然后尝试安装gem,但仍然遇到相同的错误。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我遇到了这个确切的问题,我花了很长时间才弄清楚。为了修复它,我运行了以下命令:
我的猜测是,在计算机锁定后,我最终得到了损坏的 rubygems 索引,并且此命令强制重新下载索引。
希望这可以帮助遇到此问题的人。
I had this exact problem, and it took me forever to figure it out. To fix it, I ran the following command:
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.
将 gemfile 中的源更改为:
https://github.com/grosser/parallel_tests/pull/183
Change the source in your gemfile to:
https://github.com/grosser/parallel_tests/pull/183