Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bundle install failed due to Bundler::GemspecError: Could not read gem at

I'm getting these errors while installing a bundle:

 ✗ 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 ]
like image 524
pangpang Avatar asked Dec 11 '14 05:12

pangpang


People also ask

Where does bundler install gems?

Show activity on this post. I know that when using gem install , the gem will be stored under /home/username/. rvm/gems/, under which gemset the gem was installed.

What is the difference between gem install and bundle install?

Almost seems like running 'gem install' adds it to the global available gems (and hence terminal can run the package's commands), whereas adding it to the gemfile and running bundle install only adds it to the application. Similar to npm install --global. that's basically it.


1 Answers

It seems that the bundler went to cache for the gem, so just remove the cached gem, and try again with installation of the gem:

$ rm -f /Users/liuxin/.rvm/gems/ruby-1.9.3-p547/cache/i18n-0.6.11.gem
$ gem install i18n
like image 184
Малъ Скрылевъ Avatar answered Sep 25 '22 08:09

Малъ Скрылевъ