带RVM的Rails mongrel无法启动 - mongrel_rails(MissingSourceFile)

Dan*_*dan 8 mongrel ruby-on-rails rvm

我在使用RVM和mongrel_rails方面遇到了麻烦,所以任何帮助都会非常感激.

我可以愉快地使用Ruby gem mongrel使用脚本/服务器启动我的Rails 2.x应用程序.详情:哪个rails/opt/local/bin/rails哪个mongrel_rails/opt/local/bin/mongrel_rails哪个gem/opt/local/bin/gem

但是我刚刚用Ruby 1.8.7添加了RVM并安装了我的所有宝石,包括mongrel但是当我尝试用脚本/服务器启动我的rails应用程序时,我现在得到:没有这样的文件要加载 - mongrel_rails(MissingSourceFile)

运行几个检查我发现:

其中mongrel_rails /Users/daniellewis/.rvm/gems/ruby-1.8.7-p334@nacore/bin/mongrel_rails which rails /Users/daniellewis/.rvm/gems/ruby-1.8.7-p334@nacore/bin/rails哪个宝石/Users/daniellewis/.rvm/rubies/ruby-1.8.7-p334/bin/gem

.profile有:export PATH =/opt/local/bin:/ opt/local/sbin:/ usr/local/mysql/bin:$ PATH [[-s"$ HOME/.rvm/scripts/rvm"]] && ."$ HOME/.rvm /脚本/ RVM"

(我正在使用macports)

有关为什么脚本/服务器无法找到mongrel_rails的任何想法?我只能猜测它与.profile有关,但我不确定是什么.

谢谢!

Bry*_*sen 12

问题是您在RVM中安装的新版本"gem"比在系统ruby中安装的版本更新.降级你的宝石,它应该工作:

gem update --system 1.4.1
Run Code Online (Sandbox Code Playgroud)