【问题标题】:gem install therubyracer -v '0.12.1' fails in RubyMinegem install therubyracer -v '0.12.1' 在 RubyMine 中失败
【发布时间】:2015-03-30 09:32:14
【问题描述】:

当我尝试运行以下命令时

gem install therubyracer -v '0.12.1'

我收到以下错误。我尝试安装 libv8,但当时没有成功。有人可以在这里帮助我吗?

Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing therubyracer:
    ERROR: Failed to build gem native extension.

    C:/software/ruby-1.9.3/bin/ruby.exe extconf.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:/software/ruby-1.9.3/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}/
C:/software/ruby-1.9.3/lib/ruby/gems/1.9.1/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 C:/software/ruby-1.9.3/lib/ruby/gems/1.9.1/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 C:/software/ruby-    1.9.3/lib/ruby/gems/1.9.1/gems/therubyracer-0.12.1 for inspection.
Results logged to C:/software/ruby-   1.9.3/lib/ruby/gems/1.9.1/gems/therubyracer-0.12.1/ext/v8/gem_make.out

我是 ruby​​ 新手,因此我很困惑应该在这里做什么。

【问题讨论】:

    标签: ruby-on-rails ruby therubyracer libv8


    【解决方案1】:

    您无法在 Windows 上安装 therubyracer,请参阅 this post

    由于therubyracer 只是与ExecJS 兼容的javascript 运行时之一,您可以尝试其他的,例如node.js

    只要您在开发 Ruby on Rails 应用程序,迟早您将不得不切换到 Unix 或 Linux,那么为什么不现在呢?

    【讨论】:

    • 或者用virtual box或者vmware或者其他工具之一搭建虚拟开发环境。
    猜你喜欢
    • 2015-03-01
    • 2012-06-09
    • 2013-11-08
    • 2017-02-17
    • 2015-06-13
    • 2020-10-06
    • 2015-03-26
    • 2012-08-11
    • 2023-04-09
    相关资源
    最近更新 更多