Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error install rubyracer with error "invalid gem: package is corrupt"

Tags:

ruby

gem

When trying to install therubyracer on OSX 10.9, with the command:

$ gem install therubyracer -v '0.12.0'

I get the error:

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

XCode developer tools are installed, and I've tried removing the cache file, but I still get the error.

like image 336
Oved D Avatar asked Jan 02 '14 17:01

Oved D


1 Answers

Delete /Users/doved/.rvm/gems/ruby-2.0.0-p353/cache/therubyracer-0.12.0.gem and install the gem again. RubyGems didn't download the file properly, and the system is properly reporting that the gem is corrupted.

like image 146
frandroid Avatar answered Sep 23 '22 15:09

frandroid