Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't install therubyracer in JRuby

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

like image 270
Mr_LinDowsMac Avatar asked Jan 18 '23 16:01

Mr_LinDowsMac


2 Answers

You want the Ruby Rhino.

like image 57
Dave Newton Avatar answered Jan 24 '23 14:01

Dave Newton


Just to clarify, in your Gemfile it's:

gem 'therubyrhino'

followed on the command line with:

jruby -S bundle install
like image 22
Dave Sieving Avatar answered Jan 24 '23 15:01

Dave Sieving