[英]Can't install therubyracer in JRuby
I've installed RVM and then Jruby, this the version that i get when i type: jruby -v: 我已经安装了RVM,然后安装了Jruby,这是我输入的版本: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] 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: 问题是我无法安装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
I also tried with --1.9 parameter, to force to use another ruby version, but it fails anyway. 我也尝试使用--1.9参数,强制使用另一个ruby版本,但无论如何都失败了。 Even I tried to install libv8, but i get the same error above.
即使我尝试安装libv8,但我得到了同样的错误。
Any ideas? 有任何想法吗? I have CentOS 5.7
我有CentOS 5.7
你想要Ruby Rhino 。
Just to clarify, in your Gemfile it's: 只是为了澄清,在你的Gemfile中它是:
gem 'therubyrhino'
followed on the command line with: 在命令行上跟着:
jruby -S bundle install
I've had the same problem, but defining therubyrhino in the Gemfile didn't solve my problem, bundler kept trying to install libv8. 我有同样的问题,但在Gemfile中定义therubyrhino并没有解决我的问题,bundler一直试图安装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 ): 之所以发生这种情况,是因为我在Gemfile中定义了twitter-bootstrap-rails gem,它依赖于较少的gem(取决于therubyracer),所以我改变了较少的gem以使用不依赖于较少的静态分支(如建议的那样)问题https://github.com/seyhunak/twitter-bootstrap-rails/issues/22 ):
gem 'twitter-bootstrap-rails', :git => "git://github.com/seyhunak/twitter-bootstrap-rails.git", :branch => "static"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.