Passenger can't find rails gem

Hi,

I installed rvm on my OS X Snow Leopard. And I installed ruby 1.8.7 and gemset rails3. I also installed passenger.

My rails app runs find with 'rails server'. However it doesn't run on passenger.

Error message is: Could not find gem 'rails (= 3.0.0.beta4, runtime)' in the gems available on this machine. (Bundler::GemNotFound)

I added the following line to config.ru: ENV["GEM_PATH"] = "/Users/ssk/.rvm/gems/ruby-1.8.7-p299@rails3"

/etc/apache2/other/passenger.conf has the following: LoadModule passenger_module /Users/ssk/.rvm/gems/ruby-1.8.7-p299@rails3/gems/passenger-2.2.15/ext/apache2/mod_passenger.so PassengerRoot /Users/ssk/.rvm/gems/ruby-1.8.7-p299@rails3/gems/passenger-2.2.15 PassengerRuby /Users/ssk/.rvm/rubies/ruby-1.8.7-p299/bin/ruby

Why can't passenger find rails?

How did you installed passenger? I think you must install it using rvmsudo if you're using RVM: rvmsudo passenger-install-apache2-module

Take a look at this: http://rvm.beginrescueend.com/integration/passenger/

Leonardo Mateo wrote:

Could not find gem 'rails (= 3.0.0.beta4, runtime)' in the gems PassengerRuby /Users/ssk/.rvm/rubies/ruby-1.8.7-p299/bin/ruby

Why can't passenger find rails?

How did you installed passenger? I think you must install it using rvmsudo if you're using RVM: rvmsudo passenger-install-apache2-module

Take a look at this: http://rvm.beginrescueend.com/integration/passenger/

Yes, I used rvmsudo.

Thank you.

Sam

I fixed this on my machine as follows:

The boot.rb file is the one that was generating this message, in a method called 'load_rails_gem'. If you print the value of the variable 'load_error' it will give you a specific error message as to why the gem wouldn't load. In my case, it was a mismatched version of rack; I installed a down-revision and everything worked.

-Richard.

Sam Kong wrote:

rholmes wrote:

I fixed this on my machine as follows:

The boot.rb file is the one that was generating this message, in a method called 'load_rails_gem'. If you print the value of the variable 'load_error' it will give you a specific error message as to why the gem wouldn't load. In my case, it was a mismatched version of rack; I installed a down-revision and everything worked.

-Richard.

Thanks Rechard.

I'll try that.

Sam

Oops!

I misspelled your name, Richard. Sorry.

Sam