2013-03-25 487 views
0

我的Ruby on Rails安裝出現問題。我使用RVM安裝了Ruby,然後使用gem install rails來安裝Rails。該rails命令終端工作,但如果我關閉終端並嘗試使用rails它再次給我一個錯誤:在系統啓動時啓動Rails

[email protected]:~$ rails -v 
The program 'rails' can be found in the following packages: 
* rails 
* ruby-railties-3.2 
Try: sudo apt-get install <selected package> 

使用rvm -vruby -v作品。

[email protected]:~$ rvm -v 

rvm 1.18.21 (stable) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/] 

[email protected]:~$ ruby -v 
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux] 

爲了讓鐵軌重新工作,我必須執行source .rvm/scripts/rvm

RVM被添加到.bashrc文件:PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting

我忘記了的東西,這使我不能用在啓動時的軌道?

回答

2

添加到您的.bashrc:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" 
相關問題