Archive for January 24th, 2009

Preparing Ruby on Rails environment – apache, ruby

January 24th, 2009 Comments off

In previous article I have described how to setup postgress for development, now is time to continue with the environment. At the beginning we need:

  • ruby as it is base for rails,
  • apache For serving pages,
  • java + netbeans for development.

So installation of required system packages:

emerge -qDNu ruby rubygems apache jdk

/etc/init.d/apache2 start

Install ruby gems that will be needed shortly:

UPDATE: 2009.01.26 added postgres

gem install rails capistrano capistrano-ext passenger postgres

Now we need to integrate passenger into apache – please run:


UPDATED 2009-02-06:

The installation should go without nay problems (If You followed all instructions), at the end You will be asked to modify apache configuration file – few Lines of the output – starting with LoadModule, PassengerRoot and PassengerRuby – should be copied to new apache configuration file, easiest way is to use this commands:

echo “LoadModule passenger_module /usr/lib64/ruby/gems/1.8/gems/passenger-2.0.6/ext/apache2/” > /etc/apache2/vhosts.d/01_passenger.conf

echo “PassengerRoot /usr/lib64/ruby/gems/1.8/gems/passenger-2.0.6” >> /etc/apache2/vhosts.d/01_passenger.conf

echo “PassengerRuby /usr/bin/ruby18” >> /etc/apache2/vhosts.d/01_passenger.conf

Some of the lines may differ from the output form yours passenger so please use Yours as it is better for you.

In next part we will continue with development environment.