Rails [已解决] Rails 多版本安装后的怪问题

ikebukuro · 2012年05月09日 · 最后由 geekontheway 回复于 2012年05月09日 · 2607 次阅读

按照 Wiki 内容: http://ruby-china.org/wiki/install_ruby_guide 在在 Ubuntu 12.04 上安装了 Ruby on Rails 环境。 $ source ~/.bash_profile这一步改成了$ source ~/.rvm/scripts/rvm 默认的 Rails 3.2.3 没问题,在另一个程序下 bundle 安装又一个版本 3.1.3 后,在项目下执行rails s就提示:

rails 程序还没有安装。输入以下命令可以安装: sudo apt-get install rails

这是怎么回事?

应该是把 source ~/.rvm/scripts/rvm 写到 .bashrc 最后,然后开新的 shell

我最近用 kubuntu 装了一次,好像 .bash_profile 不起效

#1 楼 @Rei 谢谢,正解。不开新的 shell 也 OK。

另外你的问题,原因是没有.bash_profile这个文件吧?

.bash_profile 登陆后只执行一次,所以 rvm 要写在.bashrc,然后 source 一下

需要 登录 后方可回复, 如果你还没有账号请 注册新账号