安装libv8(3.11.8.13)时发生错误,而Bundler不能继续。

时间:2023-01-03 05:28:32

After run bundle install I get this error:

运行bundle安装后,我得到这个错误:

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 个解决方案

#1


9  

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.

Gem::Package::FormatError:没有在…错误消息指出Ruby的缓存目录的内容与实际的gem存储库不同步。

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

可以通过删除问题文件或完整的缓存文件夹来修复错误,并再次运行bundle安装。

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. Rails:修复包“没有发现元数据”问题。
  3. Bundler issue : No metadata found
  4. Bundler问题:没有找到元数据。
  5. SO answer to RubyGems issue on OSX
  6. 所以回答RubyGems关于OSX的问题。

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

此外,它可能值得更新rubygems版本与gem更新——系统正如在这个答案中提到的。

#1


9  

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.

Gem::Package::FormatError:没有在…错误消息指出Ruby的缓存目录的内容与实际的gem存储库不同步。

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

可以通过删除问题文件或完整的缓存文件夹来修复错误,并再次运行bundle安装。

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. Rails:修复包“没有发现元数据”问题。
  3. Bundler issue : No metadata found
  4. Bundler问题:没有找到元数据。
  5. SO answer to RubyGems issue on OSX
  6. 所以回答RubyGems关于OSX的问题。

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

此外,它可能值得更新rubygems版本与gem更新——系统正如在这个答案中提到的。