2012-07-18

Install Passenger + Ruby 1.9.3 on Fedora 16

Assuming that you have installed ruby 1.9.3 from the sources, these are the steps to follow to get Passenger running your favourite Rails app on Fedora 16.

First, let's install Passenger apache module

sudo yum install -y httpd httpd-devel apr-devel apr-util-devel sudo /opt/ruby1.9.3/bin/gem install passenger
sudo /opt/ruby1.9.3/bin/passenger-install-apache2-module

Then let's configure apache to load passenger

sudo vim /etc/httpd/conf.d/passenger.conf
(Now add the lines mentioned in the output of the previous step, usually something along these lines:)
LoadModule passenger_module /opt/ruby1.9.3/lib/ruby/gems/1.9.1/gems/passenger-3.0.13/ext/apache2/mod_passenger.so
PassengerRoot /opt/ruby1.9.3/lib/ruby/gems/1.9.1/gems/passenger-3.0.13
PassengerRuby /opt/ruby1.9.3/bin/ruby

Then you should add something like this for your rails app. Customized of course:

<VirtualHost *:80>
    ServerName www.myrailsapp.net
    ServerAlias myrailsapp.net
    DocumentRoot /home/hkroger/myrailsapp/current/public
    <Directory /home/hkroger/myrailsapp/current/public>
 Options FollowSymLinks -MultiViews
        Allow from all
    </Directory>
</VirtualHost>

Restart the apache with sudo /etc/init.d/httpd restart and you are good to go!

No comments:

Post a Comment