Unable to install therubyracer in JRuby

I installed RVM and then Jruby, this version that I get when I type: jruby -v:

jruby 1.6.5.1 (ruby-1.8.7-p330) (2011-12-27 1bf37c2) (Java Virtual Machine HotSpot (TM) 1.7.0_02) [linux-i386-java]

The problem is that I cannot install therubyracer gem, I get this when I try to install 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 using the -1.9 parameter to force a different ruby โ€‹โ€‹version to be used, but in any case it fails. Even I tried to install libv8, but I got the same error above.

Any ideas? I have CentOS 5.7

+4
source share
3 answers

You want Ruby Rhino .

+7
source

To clarify, in your Gemfile this is:

 gem 'therubyrhino' 

on the command line:

 jruby -S bundle install 
+1
source

I had the same problem, but defining therubyrhino in the Gemfile did not solve my problem, the packer was trying to install libv8.

This was due to the fact that I defined a gem file on Twitter and it depends on fewer gems (this depends on therubyracer), so I changed less gems to use a static branch that does not depend on the smaller one (as suggested on the issue https://github.com/seyhunak/twitter-bootstrap-rails/issues/22 ):

 gem 'twitter-bootstrap-rails', :git => "git://github.com/seyhunak/twitter-bootstrap-rails.git", :branch => "static" 
+1
source

Source: https://habr.com/ru/post/1392783/


All Articles