mod_rails and "Apache 2... not found"

12 May 2008

This is probably too easy a fix to even blog about, but, hey. I was installing mod_rails for the first (second?) time, and got this message when I ran passenger-install-apache2-module:

* Apache 2... not found
* Apache 2 development headers... not found

I had Apache installed in /usr/local/apache2 and /usr/local/apache2/bin wasn't on the PATH, so passenger's PlatformInfo.find_httpd method couldn't find it. A quick PATH=$PATH:/usr/local/apache2/bin/ && export PATH, rerun passenger-install-apache2-module, and all was well.

5/14/2008 update: If you do this you'll probably also want to add that directory to your PATH setting in /etc/profile; otherwise you'll get similar error messages when you run passenger-memory-stats.