Install Passenger on Ubuntu Intrepid 8.10

Posted by on February 14, 2009 in Configuration, Setups

Phusion Passenger is one of the easiest Rails and Rack environments to set up and configure with Apache2. With my bootstrapping scripts, the ability to establish a Virtual machine image and have a working Rails application on it in minutes is a reality. Here is how I do it.

Bootstrap Passenger

Begin by Bootstrapping Ubuntu.

The next step is to run the script for installing Passenger. The standard passenger install against the standard Ruby 1.8.7 package managed libraries are installed with the following:

(assuming you’ve downloaded the bootstrap scripts and are in the ~/bootstrap-scripts/ubuntu/intrepid folder already, execute the following script:


Passenger’s install prompts you two or three times. Simply press and ignore the additional configuration instructions (the bootstrap script carries out these instructions for you).

Set up a demo Rails project

cd /var/www
sudo mkdir rails
cd rails
sudo rails demo
cd ..
chown -R www-data:www-data rails

Set up a Virtual Host Entry

Apache2 on Ubuntu makes it fairly straightforward to set up a provider for the Rails application, simply create the following in /etc/apache2/sites-available/demo:

<VirtualHost *:80>
  ServerName localhost
  DocumentRoot /var/www/rails/demo/public

And then enable the site:

sudo a2ensite demo
sudo /etc/init.d/apache2 reload

End Result

If all goes well, you should then be able to browse to http://localhost and see the rails greet page. Your system will look something like this:

OS: 2.6.27-7-server x86_64 GNU/Linux
Apache: Server version: Apache/2.2.9 (Ubuntu)
Passenger: 2.0.6
Ruby: ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]
Rubygems: 1.3.1
 - actionmailer (2.2.2)
 - actionpack (2.2.2)
 - activerecord (2.2.2)
 - activeresource (2.2.2)
 - activesupport (2.2.2)
 - fastthread (1.0.1)
 - passenger (2.0.6)
 - plist (3.0.0)
 - rack (0.9.1)
 - rails (2.2.2)
 - rake (0.8.3)

Where to go from here?

After you have Passenger working, you may be interested in trying it with the so-called Enterprise version of Ruby which claims 33% memory footprint reduction overall for a typical Rails application. If so, you can flip over to the Enterprise version by running the following bootstrap script:


This script will download and compile Enterprise Ruby and install Passenger against this version of Ruby, disabling the standard passenger modules in Apache (if they’re installed as per above) in the process. Does it make any real difference? We shall see! I am benchmarking performance of both standard and enterprise and will be reporting on my findings soon.

  • Rick DeNatale

    Your scripts assume that you have . on your path, which is something I don’t like to do. I needed to edit all the .sh files which were calling other .sh files to prepend ./ on the relevant lines.

    Another comment. In general I don’t like to install ruby or gems from packages on debian derived systems. I’m not sure what it would take to alter the scripts to install ruby-1.8.7 from source, and rubygems from source

  • Rick DeNatale

    Another problem. When I tried to install the enterprise version of passenger, I discovered that the file was invoking, but there’s no file by that name. Instead its, but that file seems to be getting the 1.8.6 version not 1.8.7.

    I renamed the file to but when I ran it the apache configuration seems to be pointing to the wrong place:

    $cat /etc/apache2/mods-available/ent-passenger.load
    LoadModule passenger_module /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/passenger-2.0.6/ext/apache2/
    PassengerRoot /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/passenger-2.0.6
    PassengerRuby /opt/ruby-enterprise-1.8.6-20090201/bin/ruby

    I’d have expected this to be somewhere under /usr/local rather than /opt on a debian system, my /opt directory is empty.

  • Michael

    @Rick: Thanks for the comments. From what I can tell, I don’t have “.” on my path either:

    [email protected]:~$ echo $PATH

    I will make the changes for “./” as well as I know that’ll make things more solid all around.

    ent– should be named Not sure I how I missed that one!

    I think it was the Phusion guys that chose “/opt” over the more traditional “/usr/local” (I could be wrong!). In any event, did the script actually run for you?


Read more posts by

About the Author

A software developer and network engineer for over 25 years. Currently developing Microsoft Windows desktop applications with Delphi and web services with Ruby, Ruby on Rails, Ramaze and Javascript. Web services are hosted on CentOS and Ubuntu servers under either Xen or VMWare powered via Apache, passenger, mysql and postgresql.