我在osx yosemite 10.10.1
中安装rails时遇到此错误 mezbah$ gem install rails --no-ri --no-rdoc
ERROR: Error installing rails:
invalid gem: package is corrupt, exception while verifying: undefined method `size' for nil:NilClass (NoMethodError) in /Users/mezbah/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/cache/nokogiri-1.6.6.2.gem
mezbah$ gem install nokogiri
ERROR: Error installing nokogiri:
invalid gem: package is corrupt, exception while verifying: undefined method `size' for nil:NilClass (NoMethodError) in /Users/mezbah/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/cache/nokogiri-1.6.6.2.gem
任何想法?
答案 0 :(得分:10)
我得到了答案。我删除了以前的缓存,然后一切都很好。
sudo rm /Users/username/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/cache/nokogiri-1.6.6.2.gem
brew install libiconv
gem install nokogiri