How-To Geek

Installing Ruby on Rails on Ubuntu Dapper or Edgy

Ruby on Rails is a popular new framework for developing web applications. Since Ruby on Rails includes a built-in web server for development purposes, there is no need to install a separate web server.

First you will want to make sure that you’ve enabled the universe repository.

Open up a terminal window, and type in the following commands:

sudo apt-get install ruby ri rdoc
sudo wget
tar -xvzf rubygems-0.9.0.tgz
cd rubygems-0.9.0
sudo ruby setup.rb
sudo gem install rails –include-dependencies

To test out the installation, you can create a test rails project:

$ rails testapp

This will create a test application. Change directory into that directory and launch the Ruby on Rails development server (WEBrick)

$ ./script/server


/testapp$ ./script/server
=> Booting WEBrick…
=> Rails application started on
=> Ctrl-C to shutdown server; call with –help for options
[2006-12-07 05:28:37] INFO WEBrick 1.3.1
[2006-12-07 05:28:37] INFO ruby 1.8.4 (2005-12-24) [i486-linux]
[2006-12-07 05:28:37] INFO WEBrick::HTTPServer#start: pid=6687 port=3000

You’ll notice that the server is listening on port 3000. Open up a browser, and go to http://localhost:3000

Lowell Heddings, better known online as the How-To Geek, spends all his free time bringing you fresh geekery on a daily basis. You can follow him on if you'd like.

  • Published 12/7/06

Comments (3)

  1. Piku

    You should always install the latest version of Gems (currently 1.0.1).

  2. SubbaRao

    Thanks, It helped.

  3. wedding website

    does map to localhost?

More Articles You Might Like

Enter Your Email Here to Get Access for Free:

Go check your email!