Installing Ruby Enterprise Edition and Phusion Passenger is pretty simple. I’ll go over the steps you can take to install them onto Ubuntu 10.04. Ruby Enterprise Edition can increase the speed of your Ruby based web apps as well as reduce the amount of server memory required. Passenger (or mod_rails) makes deployments of your Ruby based web apps very easy and integration with Apache 2 is dead simple.
Note: I did these steps on a clean Ubuntu 10.04 system running under VMWare.
Note: REE version 1.8.7 was the latest version available when I installed, modify the path to suite your needs for the latest available version. The following also assumes Ubuntu 32-bit. I used sudo where needed on my system so again modify as needed for your system/setup.
Open the terminal in Ubuntu and type:
$ wget http://rubyforge.org/frs/download.php/71100/ruby-enterprise_1.8.7-2010.02_i386_ubuntu10.04.deb
Once the deb package has downloaded you can install it:
$ sudo dpkg -i ruby-enterprise_1.8.7-2010.02_i386_ubuntu10.04.deb
When that has completed make sure it installed correctly by typing:
$ ruby -v
Installing Passenger is even easier:
$ sudo gem install passenger
Or if you don’t want to rdoc/ri stuff:
$ sudo gem install passenger --no-rdoc --no-ri
Time to install Apache 2:
$ sudo apt-get install build-essential apache2-prefork-dev libapr1-dev libaprutil1-dev libcurl4-openssl-dev $ sudo apt-get install apache2 $ sudo passenger-install-apache2-module
Pay close attention to the info provided at the end of the install as you need to do a minor modification to Apache 2.
Let’s go modify the file (I’m going to use pico to edit the file):
$ cd /etc/apache2 $ sudo pico apache2.conf
Copy in those mentioned configuration lines and save the file. Restart Apache next.
$ sudo /etc/init.d/apache2 restart
Verify Apache is working by going to this address: http://127.0.0.1/ (assuming you have a browser installed on Ubuntu or you can just type this:
$ telnet 127.0.0.1 80
Then type in this code and press enter twice:
GET / HTTP/1.1 Host: localhost
You should see some HTML coming back.
You now have Ruby Enterprise Edition, Phusion Passenger and Apache 2 installed.