Posted at

【メモ】invalid gem: package is corrupt, exception while verifying:~が出たので。

More than 3 years have passed since last update.

nokogiriをインストールしようとしてコケたので


  • rvm 1.26.0

  • ruby-2.1.4

$ gem install nokogiri

ERROR: Error installing nokogiri:
invalid gem: package is corrupt, exception while verifying: undefined method `size' for nil:NilClass (NoMethodError) in /Users/noriyo_tcp/.rvm/gems/ruby-2.1.4/cache/nokogiri-1.6.3.1.gem

参考記事:


http://stackoverflow.com/questions/20888318/error-install-rubyracer-with-error-invalid-gem-package-is-corrupt

いったんcache以下を削除して入れ直せと。

$ rm /Users/noriyo_tcp/.rvm/gems/ruby-2.1.4/cache/nokogiri-1.6.3.1.gem

$ gem install nokogiri