Install ruby 1.9, rails 3.2, mysql 5.1 on ubuntu 10.04

Hey all

Now most of us are working on rails 3.2.X I thought of posting about how to configure the same along with mysql server 5.1 on a Ubuntu server.

As always the first step will be to install essentials utilities.


apt-get update
apt-get install aptitude
aptitude install build-essential

Now some prerequisities for ruby

sudo apt-get -y install libc6-dev libssl-dev libmysql++-dev libsqlite3-dev make build-essential libssl-dev libreadline5-dev zlib1g-dev

Now we will move to step #2

Install Ruby 1.9.2 from source

so first download the source using


than install unzip using

apt-get install unzip
cd ruby-1.9.2-p290
./configure –prefix=/usr/local
sudo make && sudo make install

Now check if ruby got installed properly or not using ruby -v command it should show you ruby 1.9.2p290

Install mysql 5.1
sudo apt-get install mysql-server-5.1

Install Rails and essential gems
sudo gem install mysql2 rails rack rake mysql

Doing this if you get an error about UTF-8 just run the following command

export LC_ALL=”en_US.UTF-8″

I guess thats all now create your rails app using

rails new new_rails_app -d mysql

Later if you want to configure it using Apache visit my previous post on

Let me know if you face any issues in any of the steps above and I shall be happy to guide you.

Be Sociable, Share!