Ruby on Rails installation in Ubuntu

by Noman Muhammad

i'm using Ubuntu 8.10. here is the steps how i install RoR in ubuntu. i get this instruction from Ubuntu Community documentation. I just mention here the steps that i do to install RoR.

1. at first open the terminal and to get Ruby run this command

sudo apt-get install ruby-full build-essential
this command also install a web server named 'WEBrick'

2. Now to download and install ruby gems we to run the following command one after another
wget http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz
tar xzvf rubygems-1.3.1.tgz
cd rubygems-1.3.1
sudo ruby setup.rb
sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
sudo gem update --system
this will install Rubygems 1.3.1

3. then we install RAILS as gem
sudo gem install rails
4. so, RoR is installed in Ubuntu.

5. now we will install MySQL database and it's connector
sudo apt-get install mysql-server mysql-client
sudo apt-get install libmysql-ruby libmysqlclient-dev
sudo gem install mysql
6. now to create a new rails application run this command
rails /home/www/test_app -d mysql
this will create a new applicaton named 'test_app' in '/home/www' directory

7. now to run the application do the following
$cd /home/www/test_app
$ruby script/server

then go to open the browser and go to 'http://0.0.0.0:3000'. new application will respond

This entry was posted on Friday, February 13, 2009 and is filed under , , . You can leave a response and follow any responses to this entry through the Subscribe to: Post Comments (Atom) .

1 comments

Anonymous  

This is very good tutorial for RoR installation.

Thank you.