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

1

8

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 with .profile but I'm not sure what.

Thanks!

Stuckup answered 19/6, 2011 at 7:57 Comment(0)
B
12

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
Boucicault answered 24/6, 2011 at 14:23 Comment(2)
yip that fixed it alright.. I ended up updating gem for system to the latest and now just use rvm for all apps rather than system. Thanks Bryan!Stuckup
Thumbs up if you're still using that in november 2013Sascha

© 2022 - 2024 — McMap. All rights reserved.