安装 Rails 3、RVM 和 Ruby 1.9.2 后,我在运行这个 Rails 2.3.8 应用程序时遇到了问题。
necromancer@factory$ script/server
./script/../config/boot.rb:5: uninitialized constant Rails (NameError)
from script/server:2:in `require'
from script/server:2
运行后gem which rails
,我得到以下路径:
/Users/necromancer/.rvm/gems/ruby-1.8.7-p302/gems/railties-3.0.0/lib/rails.rb
所以我卸载了 railties-3.0.0 并运行gem install rails
现在,gem which rails
抛出以下错误:
ERROR: Can't find ruby library file or shared library rails
我还尝试卸载 rails 2.3.8 并bundle install
在我的应用程序中运行。然后我尝试gem uninstall rails
and gem install rails -v=2.3.8
,虽然 rails 二进制文件仍然有效,gem which rails
但仍然抛出此错误。我认为这可能是我的问题的根源......我如何让它指向我的 rvm 1.8.7 gemset 上的 rails 2.3.8?