Ubuntu - mod rails installation
Phusion’s Passenger (mod_rails) is an exciting development in serving your Ruby on Rails application with the Apache web server.
Incredibly simple to install and use, you can have a rails application up and running in no time. You don’t have to worry about ports or setting up a proxy to another server.
- Install Apache
- Install Ruby and Rubygems
Passenger (mod_rails) is a rubygem.
Update the rubygems install:
sudo gem update
sudo gem install passenger
Once passenger is installed, we need to install the Apache2 module:
A dialogue opens in the terminal. Follow the directions in the dialogue.
The passenger (mod_rails) install has found a missing dependency.
Install the headers using Aptitude:
sudo aptitude install apache2-prefork-dev
Once done, we can try the install again:
The install will complete with instructions to add some lines to the main Apache2 config file.
sudo nano /etc/apache2/apache2.conf
Note: Passenger is an active gem and is updated all the time. Rather than copy and paste the following output, please ensure you copy and paste the output from the install itself.
Because the install used in this article is v2.0.6 install, we added the following lines to my apache2.conf:
LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.0.6/ext/apache2/mod_passenger.so PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.0.6 PassengerRuby /usr/bin/ruby1.8
You may have a later version of passenger installed.
Use this command to restart Apache:
sudo /etc/init.d/apache2 restart
Continue the conversation in the Rackspace Community.
©2016 Rackspace US, Inc.
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License