无法在 JRuby 中安装 therubyracer
我已经安装了 RVM,然后安装了 Jruby,这是我输入时得到的版本: jruby -v:
jruby 1.6.5.1 (ruby-1.8.7-p330) (2011-12-27 1bf37c2) (Java HotSpot(TM)客户端VM 1.7.0_02) [linux-i386-java]
问题是我无法安装therubyracer gem,当我尝试通过 jruby -S gem install therubyracer 安装时,我得到了这个:
/usr/local/rvm/rubies/jruby-1.6.5.1/bin/jruby extconf.rb
WARNING: JRuby does not support native extensions or the `mkmf' library very we$
Check http://kenai.com/projects/jruby/pages/Home for alternatives.
Checking for Python...Unable to build libv8: Python not found!
*** 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=/usr/local/rvm/rubies/jruby-1.6.5.1/bin/jruby
我也尝试使用 --1.9 参数,强制使用另一个 ruby 版本,但它仍然失败。即使我尝试安装 libv8,但我得到了上面相同的错误。
有什么想法吗? 我有 CentOS 5.7
I've installed RVM and then Jruby, this the version that i get when i type: jruby -v:
jruby 1.6.5.1 (ruby-1.8.7-p330) (2011-12-27 1bf37c2) (Java HotSpot(TM) Client VM 1.7.0_02) [linux-i386-java]
The problem is that I can't install therubyracer gem, i get this when i try to install by jruby -S gem install therubyracer:
/usr/local/rvm/rubies/jruby-1.6.5.1/bin/jruby extconf.rb
WARNING: JRuby does not support native extensions or the `mkmf' library very we$
Check http://kenai.com/projects/jruby/pages/Home for alternatives.
Checking for Python...Unable to build libv8: Python not found!
*** 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=/usr/local/rvm/rubies/jruby-1.6.5.1/bin/jruby
I also tried with --1.9 parameter, to force to use another ruby version, but it fails anyway. Even I tried to install libv8, but i get the same error above.
Any ideas?
I have CentOS 5.7
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您想要 Ruby Rhino。
You want the Ruby Rhino.
只是为了澄清一下,在您的 Gemfile 中是:
在命令行上跟随:
Just to clarify, in your Gemfile it's:
followed on the command line with:
我也遇到了同样的问题,但是在 Gemfile 中定义 therubyrhino 并没有解决我的问题,bundler 一直尝试安装 libv8。
发生这种情况是因为我在 Gemfile 中定义了 twitter-bootstrap-rails gem,并且它依赖于 less gem(依赖于 therubyracer),所以我将 less gem 更改为使用不依赖于 less 的静态分支(如建议的那样)问题 https://github.com/seyhunak/twitter-bootstrap-rails/issues/22):
I've had the same problem, but defining therubyrhino in the Gemfile didn't solve my problem, bundler kept trying to install libv8.
That happened because I defined twitter-bootstrap-rails gem in the Gemfile, and it depends on the less gem (that depends on therubyracer), so I changed the less gem to use the static branch that not depends on less (as suggested on the issue https://github.com/seyhunak/twitter-bootstrap-rails/issues/22):