gem 在 OSX 优胜美地上安装 TheRubyracer -v '0.12.0' 不起作用



嗨,这是我的控制台日志,

Building native extensions.  This could take a while... 
ERROR:  Error installing therubyracer:
ERROR: Failed to build gem native extension.
    /Users/user/.rvm/rubies/ruby-1.9.3-p448/bin/ruby extconf.rb
checking for main() in -lpthread... yes
checking for main() in -lobjc... yes 
checking for v8.h... no 
*** extconf.rb failed *** 
Could not create Makefile due to some reason, probably lack of 
necessary libraries and/or headers.  Check the mkmf.log file for more 
details.  You may need configuration options. 
Provided configuration options: 
    --with-opt-dir 
    --with-opt-include 
--without-opt-include=${opt-dir}/include 
--with-opt-lib 
--without-opt-lib=${opt-dir}/lib 
--with-make-prog 
--without-make-prog 
--srcdir=. 
--curdir 
--ruby=/Users/user/.rvm/rubies/ruby-1.9.3-p448/bin/ruby 
--with-pthreadlib 
--without-pthreadlib 
--with-objclib 
--without-objclib 
--enable-debug 
--disable-debug 
--with-v8-dir 
--without-v8-dir 
--with-v8-include 
--without-v8-include=${v8-dir}/include 
--with-v8-lib 
--without-v8-lib=${v8-dir}/ 
/Users/user/.rvm/gems/ruby-1.9.3-p448@projVer2.3/gems/libv8-3.16.14.3/ext/libv8    /location.rb:50:in `configure': You have chosen to use the version of V8 found on your system (Libv8::Location::System::NotFoundError) 
and *not* the one that is bundle with the libv8 rubygem. However, 
it could not be located. please make sure you have a version of 
v8 that is compatible with 3.16.14.3 installed. You may 
need to special --with-v8-dir options if it is in a non-standard 
location 
thanks, 
The Mgmt 
from /Users/user/.rvm/gems/ruby-1.9.3-p448@projVer2.3/gems/libv8-3.16.14.3/lib/libv8.rb:7:in `configure_makefile' 
from extconf.rb:32:in `<main>' 

Gem files will remain installed in /Users/user/.rvm/gems/ruby-1.9.3-p448@projVer2.3/gems/therubyracer-0.12.1 for inspection. 
Results logged to /Users/user/.rvm/gems/ruby-1.9.3-p448@projVer2.3/gems/therubyracer-    0.12.1/ext/v8/gem_make.out 
FDLMC060:helpkit user$  

我尝试了很多通过自制软件安装 libv8 的链接,然后尝试安装 therubyracer 但没有帮助。

我也尝试了这个链接..

如何在 10.10 优胜美地上安装红宝石?

但是在安装 v8 本身时抛出了错误。

交换机 --

with-system-v8 安装 libv8但它没有安装Therubyracer -v '0.12.0'

OS

-> OS X 优胜美地

已安装苹果-GCC 4.2

并在CC,CXX上出口

请帮助我解决此问题。

尝试

gem install therubyracer -v '0.12.0' -- --with-v8-dir=/path/to/v8

但是在您应该在系统上安装 v8 之前

感谢@Stanislav试图帮助我。

我终于做到了,

使用 卸载所有与 libv8 相关的 gem "gem 卸载 libv8 -a -x"然后使用 "rm -rf Gemfile.lock" 删除了 Gemfile.lock。并尝试过 "捆绑安装"成功了!!!!