yosemite ruby version升级的时候,会碰到类似

Make sure that `gem install libv8 -v '3.16.14.3'` succeeds before bundling

的问题。原因是因为 libv8、therubyracer、OS这三者是集成在一起的。会因为版本的不同而出错。

解决方法:

1.查看自己的ios版本

ruby -rubygems -e 'puts Gem::Platform.new(RUBY_PLATFORM)'

对照下面的表格找出与自己版本相符合的therubyracer版本。

CPU OS OS Version libv8 therubyracer
amd64 freebsd 8 3.3.10.4 0.10.2
9
x86 darwin 10
11
linux
freebsd 9 3.11.8.3 0.11.0
x86_64 darwin 10
11 3.3.10.4 0.10.2
12 3.11.8.3 0.11.0
13 3.16.14.3 0.12.1
14 3.16.14.7
linux 3.11.8.3 0.11.0

PS:安装了libv8的话需要先卸载

gem uninstall libv8

2.修改gemfile.lock

我的是3.16.14.7所以改成libv8 (3.16.14.7)

3.执行命令

gem install libv8 -v '3.16.14.7' -- --with-system-v8

bundle config build.libv8 --with-system-v8

bundle config build.therubyracer --with-v8-dir

4.再执行bundle install就可以了

 

相关文章:

  • 2021-12-18
  • 2021-08-29
  • 2021-06-15
  • 2022-12-23
  • 2022-12-23
  • 2021-11-17
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-06
  • 2021-08-11
  • 2022-12-23
  • 2021-09-06
  • 2022-12-23
  • 2021-12-11
  • 2022-01-05
相关资源
相似解决方案