2012-09-28 42 views
0

jruby-head version.rb @ /.rvm/rubies/jruby-head/lib/ruby/shared/rubygems/version.rb has the以下的正則表達式:jruby-head Python ... ArgumentError:格式錯誤的版本號字符串2.7.2+

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

這VERSION_PATTERN沒有發現蟒蛇的版本,由於在末尾加上:

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 

回答

0

therubyracer不使用JRuby兼容。

看到這個答案的替代:

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

+0

謝謝!我有同樣的最終問題,那就是twitter-bootstrap需要這個。我在Gemfile中修改了這個修改:gem'twitter-bootstrap-rails',:git =>「git://github.com/seyhunak/twitter-bootstrap-rails.git」,:branch =>「static」 – user1244166

+0

很高興有幫助。歡迎來到stackoverflow! – Kelvin

相關問題