Ruby on Rails - The Latest issue

If I had a nickle for every time my rails applications just fail unpredictably after some system upgrade, Warren Buffet would have to move over.

Here is the latest (December 22, 2012). Once again rails is dead after a reboot After a set of system upgrades, I check the usual things that don't work. Is the web server running (OK, it is), are my rails applications working (nope). Of course it is late in the day on Friday. No clue this time just trying things from the browser, I am just getting a 500 error "server internal error". Well, I guess that is kinda a clue, usually passenger will try to tell me something if rails itself is screwed up.

I say the heck with it, thank myself I am not using rails for an important production project and go home. Then when I am in the mood to solve a puzzle, I start looking at the apache logs. Sure enough, in /var/log/httpd/error_log and see:

  [ pid=1578 thr=140202594383936 file=ext/apache2/Hooks.cpp:862 time=2012-12-22 06:47:47.396 ]:
   Unexpected error in mod_passenger: Cannot spawn application '/u1/rails/micros':
   The spawn server died unexpectedly, and restarting it failed.
   Backtrace:
     in 'virtual Passenger::SessionPtr Passenger::ApplicationPool::Client::get(const Passenger::PoolOptions&)' (Client.h:742)
     in 'Passenger::SessionPtr Hooks::getSession(const Passenger::PoolOptions&)' (Hooks.cpp:294)
     in 'int Hooks::handleRequest(request_rec*)' (Hooks.cpp:563)

Who knows what all this means in detail (but passenger looks sick). Some google searching online yields the usual know-nothings suggesting things to try.

What I do to fix it (and I get lucky), is to reinstall phusion passenger:

su
gem install passenger
 Fetching: passenger-3.0.18.gem (100%)
 Successfully installed passenger-3.0.18
 1 gem installed
passenger-install-apache2-module
service httpd restart
And voila, I am back on line!

I wonder what passenger I was running prior to this. Probably the fedora distributed RPM package, which would have been:

mod_passenger.x86_64                    3.0.17-2.fc17                updates
So, a person could blame this on fedora, apache, passenger, rails. No doubt some new apache version came along that is incompatible with passenger 3.0.17 and the fedora package set has become out of whack. This is an eternal question when a person is running rails (what version of ruby do I run? Should I get my packages from my linux vendor or via the gem system? How do I keep my gems up to date? Should I keep my gems up to date? ....)
Feedback? Questions? Drop me a line!

Ruby on Rails notes / tom@mmto.org