2016-01-05 9 views
5

をインストールされている場合でも、私は、このコマンドを使用して、Windows上でlibv8宝石をインストールしているインストールされません:宝石therubyracerがlibv8が

gem install libv8 -- --with-system-v8 

私はtherubyracerをインストールしようとすると、その後それは私に長いエラーメッセージを表示します。

Installing therubyracer 0.12.2 with native extensions 

Gem::Ext::BuildError: ERROR: Failed to build gem native extension. 

current directory: D:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/therubyracer- 0.12.2/ext/v8 
D:/Ruby21-x64/bin/ruby.exe -r ./siteconf20160105-4924-101vdyd.rb extconf.rb 
checking for main() in -lpthread... 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 
--without-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=D:/Ruby21-x64/bin/ruby 
--with-pthreadlib 
--without-pthreadlib 
--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}/lib 
D:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.13/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.13 installed. You may 
need to special --with-v8-dir options if it is in a non-standard 
location 

thanks, 
The Mgmt 

私が理解したのは、thebyracerがv8を探していることです。すでにNode.jsがインストールされています。それを使用することも可能ですか?あるいは、裁判官のための他の解決策がありますか?

+0

は、それほど助けることはできませんが、V8のための "develの"(ソース)ファイルが必要です。 'check for v8.h ... no' –

+0

Pauloが言ったように、v8用のdevelバージョンが必要です。' therubyracer'で回避する代わりに、 'nodejs'を' therubyracer'で動作させるのではなく、あなたの箱にインストールしてみてください。 'rake'タスクだけを実行してください。 –

+0

私はgithubからv8のrawソースをダウンロードしました、それと一緒にtheruraracerをインストールするには? –

答えて

24

このバグはOS X El Capitanに表示されます。 therubyracerには[email protected]を使用してください。私はただのLinuxを使用しているため

brew install [email protected] 
bundle config --local build.libv8 --with-system-v8 
bundle config --local build.therubyracer --with-v8-dir=/usr/local/opt/[email protected] 
bundle install 

Check detail of this issue

+1

ありがとうございました。私もそのメッセージを受け取りました。「バンドル前に 'gemがtherbyracer -v '0.12.2'をインストールすることが成功していることを確認してください。 –

+1

私は同意します.rubyracer 0.12.2を使用して、これらのバンドル設定オプションを設定することができました。私はこのオプションを主に使用しました。なぜなら、実際にGemfileで使用できる方法で問題を解決し、データベースはデプロイ時に奇妙な問題を引き起こさないからです。 – iturgeon

+1

'エラー:名前に使用可能な式がありません" v8-315 "' – jameshfisher

関連する問題