本文是小编为大家收集整理的关于在安装libv8(3.11.8.13)时发生错误,Bundler无法继续安装的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。
问题描述
运行束安装后,我会得到此错误:
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.
我尝试
gem install libv8 -v '3.11.8.13'
但我得到
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
这里有什么问题.请一些帮助.
推荐答案
Gem::Package::FormatError: no metadata found in ...错误消息指示Ruby的高速缓存目录的内容与实际的GEM存储库不同步.
可以通过删除有问题的文件或完整的缓存文件夹来解决该错误,然后再次运行bundle install.
首先尝试删除有问题的文件:
rm ~/.rvm/gems/ruby-1.9.3-p286/cache/libv8-3.11.8.13-x86_64-darwin-12.gem bundle install
应该解决问题.如果没有,请删除完整的缓存文件夹:
rm -rf ~/.rvm/gems/ruby-1.9.3-p286/cache/ bundle install
参考:
问题描述
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.
推荐答案
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:
- Rails: Fixing Bundle “No Metadata Found” issues
- Bundler issue : No metadata found
- SO answer to RubyGems issue on OSX
Additionally, it might be worth updating rubygems version with gem update --system as mentioned in this answer