Passenger “Missing the Rails 2.3.4 gem” after Apache restart

apache-2.2phusion-passengerruby-on-railsrubygems

I have a rails app running on passenger/apache 2.2.3/RHEL. Everything was working fine until I had to restart Apache. Once I did that, I got the following message:

Missing the Rails 2.3.4 gem. Please gem install -v=2.3.4 rails, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.

I'm not sure what to do, since the app was running fine before. I did touch restart.txt to try to restart it, deployed from Capistrano again, and removed/installed the rails gem again but nothing worked. rails -v prints Rails 2.3.4.

Best Answer

I solved this a while ago by restarting apache with the command /etc/init.d/httpd restart rather than service httpd restart. Not sure why that worked, but it did. None of the environment.rb changes did anything.

Related Topic