昨天已经单独安装过很多次了 gem install libv8 -v '3.16.14.7',当时显示 gem 是安装成功的, 然后 bundle install 还是提示如下:
Bundler::GemspecError: Could not read gem at /Users/yebiying/.rvm/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/cache/libv8-3.16.14.7-x86_64-darwin-13.gem. It may be corrupted.
An error occurred while installing libv8 (3.16.14.7), and Bundler cannot continue.
Make sure that `gem install libv8 -v '3.16.14.7'` succeeds before bundling.
后来就按 google 的一些解法,各种折腾,比如
gem install libv8 -- --with-system-v8
gem update --system
gem update
结果 bundle install 还是同样的出错。想再 gem install libv8 -v '3.16.14.7'时,反而出现新的错误提示
gem install libv8 -v '3.16.14.7'
ERROR: Error installing libv8:
invalid gem: package is corrupt, exception while verifying: undefined method `size' for nil:NilClass (NoMethodError) in /Users/yebiying/.rvm/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/cache/libv8-3.16.14.7-x86_64-darwin-13.gem
已经完全 google 不到方案了…… 各位大神,快救救我! 我这是新的 MBP 第一次 bundle install,以前在我的 ubuntu 上没发现过类似的问题……
rm /Users/yebiying/.rvm/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/cache/libv8-3.16.14.7-x86_64-darwin-13.gem
bundle