1

Windows 7 64 ビットで Ruby on Rails プロジェクトを実行しようとしていますが、 gembundle installが原因で実行できません。therubyracerUbuntu で開発しましたが、Windows 7 コンピューターで運用環境として実行する必要があります。

検索した結果、 https ://github.com/eakmotion/therubyracer_for_windows/blob/master でこの gem を使用する必要があることがわかりました。therubyracer-0.11.0beta1-x86-mingw32私の宝石にインストールされているようです。gem install libv8 --version '3.11.8.17' on ruby​​ (windows) でgem install libv8 -v '3.16.14.7' -- --with-system-v8提案されているように、を使用して libv8 もインストールしました。

ただし、その gem のインストール手順に従った後でも、 gem (バージョン 0.12.1)bundle installをインストールしようとします。therubyracer私の質問は、手動でインストールした therubyracer gem を使用して bundle install を実行するにはどうすればよいですか?

バージョン: Ruby 2.1.5、Rails 4.1.8、Rails Installer http://www.railsinstaller.org/enを使用してインストール

Gemfile の関連する行:

gem "therubyracer"
gem "less-rails"
gem "twitter-bootstrap-rails"

と交換"therubyracer"した場合、 を実行しようとすると"therubyracer_for_windows"エラー メッセージが表示されます。Could not find gem 'therubyracer_for_windows (>= 0) ruby' in the gems available on this machine.bundle install

のエラー メッセージbundle install:

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

    current directory: C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/ther
ubyracer-0.12.1/ext/v8
C:/RailsInstaller/Ruby2.1.0/bin/ruby.exe -r ./siteconf20160211-944-u6p7vs.rb ext
conf.rb
checking for main() in -lpthread... no
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=C:/RailsInstaller/Ruby2.1.0/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
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.7/ext/libv8/l
ocation.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.7 installed. You may
need to special --with-v8-dir options if it is in a non-standard
location

thanks,
The Mgmt

        from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.
7/lib/libv8.rb:7:in `configure_makefile'
        from extconf.rb:32:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can
 be found here:

  C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/extensions/x86-mingw32/2.1.0/t
herubyracer-0.12.1/mkmf.log
4

1 に答える 1