在osx Yosemite 10.10.1中安装rails时,无效gem:包损坏



在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

相关内容

  • 没有找到相关文章

最新更新