gpt4 book ai didi

ruby - 全新安装 OSX 10.9.1 在尝试安装 gems 时返回 "undefined method ` path2class'"

转载 作者:数据小太阳 更新时间:2023-10-29 06:33:39 26 4
gpt4 key购买 nike

我刚刚使用 Homebrew 和 RVM 安装了一个干净的 Mavericks 安装。 brew doctorrvm requirements 都返回“all good”,但是,当我在我的项目目录中运行 bundle install 时,我的大多数 gem 安装都很好,但少数安装失败并出现相同的以下错误:

Bundler::GemspecError: Could not read gem at /Users/NK/.rvm/gems/ruby-2.0.0-p353/cache/eventmachine-1.0.3.gem. It may be corrupted.
An error occurred while installing eventmachine (1.0.3), and Bundler cannot continue.
Make sure that `gem install eventmachine -v '1.0.3'` succeeds before bundling.

然后,如果我再次尝试使用 gem install eventmachine -v '1.0.3' 我会得到:

ERROR:  Error installing eventmachine:
invalid gem: package is corrupt, exception while verifying: undefined method `path2class' for #<Psych::ClassLoader:0x000001018f7990> (NoMethodError) in /Users/NK/.rvm/gems/ruby-2.0.0-p353/cache/eventmachine-1.0.3.gem

我试图内爆 RVM 并重新安装,但没有任何帮助。

其他人似乎也有同样的问题,但似乎还没有人找到答案:

编辑

也看看这两个:

最佳答案

原来这是旧版psych中的一个bug,但无法解决,只要安装ruby with RVMs staticly linked gems即可。所以基本上问题与 RVM 静态链接的 gem 有关。使用 --disable-binary 安装 rubies 解决了这个问题:

rvm install 2.0.0-p353 --disable-binary

或重新安装:

rvm reinstall 2.0.0-p353 --disable-binary

关于ruby - 全新安装 OSX 10.9.1 在尝试安装 gems 时返回 "undefined method ` path2class'",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21690783/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com