Setup Passenger 4 (pre-release RC4) for Apache2 and Ruby 2.0.0

Setting up Apache2 and passenger for Ruby 2.0.0 is actually pretty simple. As of right now, for Passenger to work with Apache2 and Ruby 2.0.0 you will need to install Passenger 4 RC4 or above, which currently isn’t (technically) a stable release. I have found it’s pretty stable though.

Install passenger through RubyGems

First, install passenger through gems:

gem install passenger --pre

Install the Apache2 passenger module

Next, you need to install the Apache2 passenger module. Thankfully there is a binary for this, to find the binary run the following command:

which passenger-install-apache2-module
> /home/srcnix/.rvm/gems/ruby-2.0.0-p0/bin/passenger-install-apache2-module

Change directory to the absolute path (bin directory) and run the install, follow the instructions.

cd /home/srcnix/.rvm/gems/ruby-2.0.0-p0/bin/

The compilation may take a while so sit back and relax or grab a beverage.

Once completed you will need to update your apache config:

sudo vi /etc/apache2/apache2.conf

At the end of the config file tell Apache2 to load passenger. This information is provided during the passenger module installation process, so simply copy and paste to ensure the paths are correct.

LoadModule passenger_module /home/srcnix/.rvm/gems/ruby-2.0.0-p0/gems/passenger-4.0.0.rc4/libout/apache2/
PassengerRoot /home/srcnix/.rvm/gems/ruby-2.0.0-p0/gems/passenger-4.0.0.rc4
PassengerRuby /home/srcnix/.rvm/wrappers/ruby-2.0.0-p0/ruby

That’s about it, you’re good to go!

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>