我刚刚使用 Homebrew 和 RVM 安装了一个干净的 Mavericks 安装。然而,当我在我的项目目录中运行时,两者都brew doctor
返回rvm requirements
“一切都好”,我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 并重新安装,但没有任何帮助。
其他人似乎也有同样的问题,但似乎还没有人资助答案:
编辑
也可以看看这两个: