0

jruby-head version.rb @ /.rvm/rubies/jruby-head/lib/ruby/shared/rubygems/version.rb 具有以下正则表达式:

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

由于末尾的加号,此 VERSION_PATTERN 未找到 pythons 版本:

2.7.2+ 

我试过修改:

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

第 148 行至:

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

匹配那个加号,但它不起作用。我想我的正则表达式错了。

使用 jruby 头:

% 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
4

1 回答 1

0

therubyracer与 jruby 不兼容。

请参阅此答案以获取替代方法:

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

于 2012-09-28T20:06:32.817 回答