I just installed a clean Mavericks installation with Homebrew and RVM. Both brew doctor
and rvm requirements
return "all good", however, when I run bundle install
in my project dir most of my gems install fine, but a handful fail to install with the same following error:
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.
Then, if I try again with gem install eventmachine -v '1.0.3'
I get:
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
I tried to implode RVM and reinstall, but nothing helps.
Other people seem to have the same problem, but no one seems to have fund the answer yet:
- http://pastebin.com/LV53GdR2
- Install Rails Error "invalid gem: package is corrupt"
- Error install rubyracer with error "invalid gem: package is corrupt"
EDIT
See those two as well: