1

我是 ruby​​ on rails 的新手。我尝试使用以下命令安装 ruby​​、rails 和 rvm:

curl -L get.rvm.io | bash -s stable --rails

它工作得很好,但是现在我正在尝试检查它说的 ruby​​ & rails ( ruby -v, ) 的版本。rails -vcommand not found

这就是它所显示的(我只粘贴了最后几行......):

Installing RDoc documentation for json-1.7.4...
Installing RDoc documentation for rdoc-3.12...
Installing RDoc documentation for railties-3.2.7...
Installing RDoc documentation for rails-3.2.7...



 * To start using RVM you need to run `source /home/betteruse/.rvm/scripts/rvm`
    in all your open shell windows, in rare cases you need to reopen all shell windows.

  * To start using rails you need to run `rails new <project_dir>`.

[betteruse@BL-58 ~]$ ruby -v
bash: ruby: command not found
[betteruse@BL-58 ~]$ rails -v
bash: rails: command not found

谁能帮忙???谢谢 !!!

4

1 回答 1

1

尝试 rvm 重新加载

如果仍然无法正常工作,则将以下行插入到您的 .bashrc 或 .bash_profile 文件中

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function

还要确保你已经curl -L get.rvm.io | bash -s stable --rails从主目录运行

于 2012-08-09T07:58:51.193 回答