Installing Ruby on Rails on Ubuntu Karmic Koala

Here’s the steps I took to install Ruby on Rails on a fresh Ubuntu 9.10 Karmic Koala.

Update/upgrade system

sudo apt-get update

Install ruby, irb and rdoc

sudo apt-get install ruby irb rdoc

Install required Ubuntu packages

sudo apt-get install libopenssl-ruby build-essential ruby1.8-dev libpq-dev

Install rubygems

wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz
tar -xvzf rubygems-1.3.5.tgz
cd rubygems-1.3.5/
sudo ruby setup.rb
sudo gem update --system

Install Rails (with gem)

sudo gem install rails

If you need to install postgresql

sudo apt-get install postgresql

Create the postgres user
sudo su postgres
createuser

Need to create a postgres database?
createdb

Install the ruby to postgres driver

sudo gem install postgres

Finished

That’s it, Ruby on Rails should be installed along with Postgresql if you need it.

Credit goes to Peter Vandenabeele for the basis for these steps.

2 Responses to “Installing Ruby on Rails on Ubuntu Karmic Koala”

  1. Betty Ricciardi Says:

    Hi, i just thought i’d post a comment and let you know your blogs layout is really messed up on the K-Melon browser. Anyhow keep up the good work!

  2. Paul Riley Says:

    You are a god among men, sir. You’ve just saved me hours of effort