开发者

Rails mongrel with RVM fails to startup - mongrel_rails (MissingSourceFile)

I'm having trouble with RVM and mongrel_rails getting along, so any help would be greatly appreciated.

I can happily start my Rails 2.x application with script/server using the Ruby gem mongrel. Details: which rails /opt/local/bin/rails which mongrel_rails /opt/local/bin/mongrel_rails which gem /opt/local/bin/gem

However I've just added RVM with Ruby 1.8.7 and installed all my gems including mongrel but when i try to start my rails app with script/server I now get: no such file to load -- mongrel_rails (MissingSourceFile)

Running a few checks I find:

which 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 which gem /Users/daniellewis/.rvm/rubies/ruby-1.8.7-p334/bin/gem

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

(I'm using macports)

Any ideas on why script/server can't find mongrel_rails? I can only guess it's to do 开发者_如何学Gowith .profile but I'm not sure what.

Thanks!


The problem is that you have a newer version of "gem" installed inside of RVM than you do in your system ruby. Downgrade your gem and it should work:

gem update --system 1.4.1
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜