LoginSignup
10
13

More than 5 years have passed since last update.

Windowsにgemのlibv8を入れる

Posted at

以前やった手順でWindowsにRubyInstaller,EVELOPMENT KITをインストールした状態で、bundleでibv8を入れようとしたところ以下のようなエラーが出た

C:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.17/ext/libv8/builder.rb:49:in `setup_python!': libv8 requires python 2 to be installed in order to build, but it is currently not available (RuntimeError)
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.17/ext/libv8/builder.rb:35:in `block in build_libv8!'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.17/ext/libv8/builder.rb:34:in `chdir'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.17/ext/libv8/builder.rb:34:in`build_libv8!'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.17/ext/libv8/location.rb:24:in`install!'
        from extconf.rb:7:in `<main>'


Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.17 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.17/ext/libv8/gem_make.out
An error occurred while installing libv8 (3.11.8.17), and Bundler cannot
continue.
Make sure that `gem install libv8 -v '3.11.8.17'` succeeds before bundling.

対応

  • bundle installの前にlibv8を入れる
    • エラーメッセージでは libv8 requires python 2 とあるけどPythonは入れなくてもインストールできた
    • -- --with-system-v8 がないとインストールできなかった

$ gem install libv8 -v '3.11.8.17' -- --with-system-v8

  • bundle installに--path指定してるような人はbundle config試すと良いんじゃないかと思う(試してないけど)

補足

10
13
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
13