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-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
答案 0 :(得分:0)