Rails: Phusion Passenger

Passenger is an application server for Ruby (Rack) and Python (WSGI) apps.

Some notes on installing it:


Ignore the docs that suggest:

$ sudo gem install passenger

$ sudo passenger-install-apache2-module

Instead use:

gem install passenger


Then paste the LoadModule code it spits out at the end into your Apache conf file.

Test whether Passenger has installed by running:

curl -sI localhost | grep ^Server

and check for the “Phusion_Passenger” signature. E.g. 

Server: Apache/2.2.22 (Unix) DAV/2 PHP/5.3.15 with Suhosin-Patch Phusion_Passenger/4.0.5 mod_ssl/2.2.22 OpenSSL/0.9.8x

If you need to uninstall Passenger using sudo then:

$ sudo gem uninstall passenger

And a discussion on whether to use rvmsudo or not here:


In short, https://www.phusionpassenger.com/download

suggests using `sudo` but the rvm page suggests not:



If you get a warning doing the passenger install apache2 module like this:

rvmsudo rvm get stable && rvm reload && rvmsudo rvm repair all

Warning: can not check `/etc/sudoers` for `secure_path`, falling back to call via `/usr/bin/env`, this breaks rules from `/etc/sudoers`. Run:

    export rvmsudo_secure_path=1

Then run:

    export rvmsudo_secure_path=1


rvmsudo rvm get stable && rvm reload && rvmsudo rvm repair all

(remember to run `rvm requirements` afterwards)

On the Mac the Apache conf and restart commands go like this:

[~]$ sudo vim /etc/apache2/httpd.conf

[~]$ sudo apachectl restart

See also:


and this very useful guide:


Leave a Reply

Your email address will not be published. Required fields are marked *