在CentOS上安装ROR

时间:2012-08-09 07:26:20

标签: ruby-on-rails installation centos

我是ruby on rails的新手。我试过安装ruby,rails& rvm使用此命令:

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

它工作正常但是,现在我正在尝试检查ruby&的版本rails {ruby -vrails -v)它说command 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

任何人都可以帮忙吗? 谢谢!!!

1 个答案:

答案 0 :(得分:1)

尝试rvm reload

如果仍然无效,则将以下行插入.bashrc或.bash_profile文件

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

还要确保您已从主目录

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