我在 OSx 10.7.4 上安装了 rails 和 RVM
如果我这样做
$ cd ~/
$ rails -v
我明白了
$ Rails 3.2.3
现在,如果我进入 Rails 应用程序
$ cd ~/rails-project/
Using ~/.rvm/gems/ruby-1.9.2-p320 with gemset ourgemset
rails 应用程序中的 .vmrc 文件如下所示
rvm use --create 1.9.2@ourgemset
但是,当我现在尝试使用 rails 时,我得到了
$ rails -v
Rails is not currently installed on this system. To get the latest version, simply type:
sudo gem install rails
You can then rerun your "rails" command.
我的 ~/.bash_profile 在它的末尾有这一行(并且这些脚本存在)
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function
我不知道为什么会发生这种情况或在哪里解决它。
编辑:
如果我执行以下操作,则进一步调查
$ rvm use default
Using ~/.rvm/gems/ruby-1.9.3-p194 with gemset anothergemset
现在导轨工作正常。如果我切换回
$rvm use ruby-1.9.2-p320
我不能再使用导轨了。帮助!