在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
任何想法?
我得到了答案。我删除以前的缓存,然后一切都好。
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