Ubuntu:Rails安装需要Ruby => 1.9.3

时间:2023-01-18 09:17:25

I'm having touble installing rails on my new installation of Ubuntu 12.04 LTS. I have RVM and rubygems 2.2.2 installed but when I go to install rails I get an error;

我在我的新安装的Ubuntu 12.04 LTS上安装了更多的导轨。我安装了RVM和rubygems 2.2.2但是当我去安装rails时出现错误;

anesu@ubuntu:~$ gem install rails
[sudo] password for anesu: #I enter my passsword here
ERROR:  Error installing rails:
activesupport requires Ruby version >= 1.9.3.
anesu@ubuntu:~$ ruby -v
ruby 1.9.3p545 (2014-02-24 revision 45159) [x86_64-linux]

The ruby required is clearly installed. I've also tried

所需的红宝石明显安装。我也试过了

gem install rails #without sudo

but still get the same error. What could be the problem?

但仍然得到相同的错误。可能是什么问题呢?

1 个解决方案

#1


0  

Do you have rvm in your path? If not, add the following line to your ~.bashrc file...

你的路上有rvm吗?如果没有,请将以下行添加到〜.bashrc文件中......

PATH=$PATH:$HOME/.rvm/bin

Be sure and open and close the terminal after you all this. At the terminal you should be able to type 'echo $PATH' and see RVM listed.

完成所有这些后,请确保打开并关闭终端。在终端,您应该能够输入'echo $ PATH'并查看列出的RVM。

#1


0  

Do you have rvm in your path? If not, add the following line to your ~.bashrc file...

你的路上有rvm吗?如果没有,请将以下行添加到〜.bashrc文件中......

PATH=$PATH:$HOME/.rvm/bin

Be sure and open and close the terminal after you all this. At the terminal you should be able to type 'echo $PATH' and see RVM listed.

完成所有这些后,请确保打开并关闭终端。在终端,您应该能够输入'echo $ PATH'并查看列出的RVM。