我在安装捆绑包时遇到这些错误:
✗ bundle install
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Bundler::GemspecError: Could not read gem at /Users/liuxin/.rvm/gems/ruby-1.9.3-p547/cache/i18n-0.6.11.gem. It may be corrupted.
An error occurred while installing i18n (0.6.11), and Bundler cannot continue.
Make sure that `gem install i18n -v '0.6.11'` succeeds before bundling.
✗ gem install i18n -v '0.6.11'
ERROR: Error installing i18n:
invalid gem: package metadata is missing in /Users/liuxin/.rvm/gems/ruby-1.9.3-p547/cache/i18n-0.6.11.gem
✗ rvm list
rvm rubies
=* ruby-1.9.3-p547 [ x86_64 ]
ruby-2.1.2 [ x86_64 ]
答案 0 :(得分:32)
似乎bundler
去了gem的缓存,所以只需删除缓存的gem,然后再安装gem:
$ rm -f /Users/liuxin/.rvm/gems/ruby-1.9.3-p547/cache/i18n-0.6.11.gem
$ gem install i18n