简体   繁体   English

在Jruby中安装Rails时ActiveSupport错误

[英]Activesupport error while installing rails in jruby

I installed jRuby using rvm. 我使用rvm安装了jRuby。 It's version is jruby-1.6.7.2 [ i386 ]. 它的版本是jruby-1.6.7.2 [i386]。 Now I am trying to install rails on top of it. 现在,我正在尝试在其顶部安装滑轨。 But I am getting following error 但我收到以下错误

ERROR: Error installing rails: activesupport requires Ruby version >= 1.9.3. 错误:安装rails时出错:activesupport需要Ruby版本> = 1.9.3。

I am using following command to install rails which I found in many answers on so itself. 我正在使用以下命令安装Rails,我在很多答案中都找到了它。

jruby -S gem install rails --pre --no-rdoc --no-ri jruby -S gem安装导轨--pre --no-rdoc --no-ri

I also tried passing --1.9 option to jruby so that it can use ruby 1.9 interpreter. 我还尝试将--1.9选项传递给jruby,以便它可以使用ruby 1.9解释器。 But that also not working. 但这也不起作用。

jruby --1.9.3 -S gem install rails jruby --1.9.3 -S gem安装导轨

My RVM list is as follows : 我的RVM列表如下:

rvm rubies rvm红宝石

 => jruby-1.6.7.2 [ i386 ]
    ruby-1.8.7-p358 [ i686 ]
  * ruby-1.9.3-p194 [ i686 ] 
    ruby-1.9.3-p286 [ i686 ]

Please guide me whats going wrong? 请指导我怎么了?

Are you able to update your JRuby version? 您可以更新您的JRuby版本吗?

Alternatively, try set this shell variable: 或者,尝试设置此shell变量:

export JRUBY_OPTS=--1.9

...then re-execute your gem install rails command. ...然后重新执行您的gem install rails命令。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM