An error occurred while installing libv8 (3.11.8.13), and Bundler cannot continue

梦想的初衷 提交于 2019-12-21 17:18:21

问题


After run bundle install I get this error:

Gem::Package::FormatError: no metadata found in /Users/jeanosorio/.rvm/gems/ruby-1.9.3-p286/cache/libv8-3.11.8.13-x86_64-darwin-12.gem
An error occurred while installing libv8 (3.11.8.13), and Bundler cannot continue.
Make sure that `gem install libv8 -v '3.11.8.13'` succeeds before bundling.

I try with

gem install libv8 -v '3.11.8.13'

But I get

ERROR:  Error installing libv8:
    invalid gem format for /Users/jeanosorio/.rvm/gems/ruby-1.9.3-p286/cache/libv8-3.11.8.13-x86_64-darwin-12.gem

What is the problem here. Please some help.


回答1:


The Gem::Package::FormatError: no metadata found in ... error message indicates that the content of Ruby's cache directory gets out of sync with the actual gem repository.

The error can be fixed by removing either the offending file or the complete cache folder, and running bundle install again.

First try removing the offending file:

rm ~/.rvm/gems/ruby-1.9.3-p286/cache/libv8-3.11.8.13-x86_64-darwin-12.gem
bundle install

That should fix the problem. If it doesn't, remove the complete cache folder:

 rm -rf ~/.rvm/gems/ruby-1.9.3-p286/cache/
 bundle install

Ref:

  1. Rails: Fixing Bundle “No Metadata Found” issues
  2. Bundler issue : No metadata found
  3. SO answer to RubyGems issue on OSX

Additionally, it might be worth updating rubygems version with gem update --system as mentioned in this answer



来源:https://stackoverflow.com/questions/14776685/an-error-occurred-while-installing-libv8-3-11-8-13-and-bundler-cannot-continu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!