【问题标题】:An error occurred while installing libv8 (3.11.8.13), and Bundler cannot continue安装 libv8 (3.11.8.13) 时出错,Bundler 无法继续
【发布时间】:2013-02-08 16:08:47
【问题描述】:

运行 bundle install 后出现此错误:

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

这里有什么问题。请帮忙。

【问题讨论】:

  • 不确定是什么问题,但我遇到了完全相同的问题。我似乎记得能够用自制软件解决它。升级到山狮推出的 Xcode 后,我在使用 libv8 时遇到了各种问题。

标签: ruby rubygems ruby-on-rails-3.2


【解决方案1】:

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

参考:

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

此外,可能值得用gem update --system 更新rubygems 版本,如this answer 中所述

【讨论】:

  • 我以 root 身份使用 the argument 卸载并重新安装它。不工作。我的错误是An error occurred while installing libv8 (3.16.14.3), and Bundler cannot continue.Bundler::GemspecError: Could not read gem at /home/gitlab/gitlab/vendor/bundle/ruby/2.1.0/cache/libv8-3.16.14.3-x86_64-linux.gem. It may be corrupted. 我删除了整个缓存并重新运行bundle install --full-index --deployment --without development test postgres aws。工作。
猜你喜欢
  • 1970-01-01
  • 2016-03-14
  • 2022-01-20
  • 2017-02-09
  • 2018-09-08
  • 2020-01-16
  • 2021-06-25
  • 2014-01-12
  • 2018-04-05
相关资源
最近更新 更多