Ruby on Rails 类型错误

发布于 2024-11-13 05:52:56 字数 215 浏览 8 评论 0原文

我一直在开发 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

好久不见√ 2024-11-20 05:52:56

我遇到了这个确切的问题,我花了很长时间才弄清楚。为了修复它,我运行了以下命令:

bundle install --full-index

我的猜测是,在计算机锁定后,我最终得到了损坏的 ruby​​gems 索引,并且此命令强制重新下载索引。

希望这可以帮助遇到此问题的人。

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.

七七 2024-11-20 05:52:56

将 gemfile 中的源更改为:

source 'https://rubygems.org'

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

Change the source in your gemfile to:

source 'https://rubygems.org'

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文