Question

jruby-head version.rb @ /.rvm/rubies/jruby-head/lib/ruby/shared/rubygems/version.rb has the following regex:

VERSION_PATTERN = '[0-9]+(\.[0-9a-zA-Z]+)*' # :nodoc:

This VERSION_PATTERN is not finding pythons version due to the plus at the end:

2.7.2+ 

I've tried modifying:

/.rvm/rubies/jruby-head/lib/ruby/shared/rubygems/version.rb 

line 148 to:

VERSION_PATTERN = '[0-9]+(\.[0-9a-zA-Z]+)*\+?' # :nodoc:

to match that plus, but it isn't working. I think I have my regex wrong.

Using jruby-head:

% ruby --version
jruby 1.7.0.RC1 (1.9.3p203) 2012-09-26 4f2c44e on OpenJDK 64-Bit Server VM 1.6.0_24-b24 [linux-amd64]


% env |grep JRUBY
JRUBY_OPTS=-Xcext.enabled=true

% rvm list
rvm rubies

=> jruby-head [ x86_64 ]
ruby-1.9.2-p320 [ x86_64 ]
* ruby-1.9.3-p194 [ x86_64 ]

% python --version
  Python 2.7.2+

% gem install therubyracer
WARNING:  Error fetching data: bad response Internal Server Error 500 (http://production.s3.rubygems.org/latest_specs.4.8.gz)
Building native extensions.  This could take a while...
ERROR:  Error installing therubyracer:
ERROR: Failed to build gem native extension.

    /.rvm/rubies/jruby-head/bin/jruby extconf.rb

/.rvm/rubies/jruby-head/lib/ruby/shared/mkmf.rb:14: Use RbConfig instead of obsolete and deprecated Config.
Checking for Python...ArgumentError: Malformed version number string 2.7.2+
initialize at /.rvm/rubies/jruby-head/lib/ruby/shared/rubygems/version.rb:187
Was it helpful?

Solution

therubyracer is not compatible with jruby.

See this answer for an alternative:

https://stackoverflow.com/a/8994291/498594

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top