Subscribe to 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 http://rubyforge.org/frs/download.php/11289/rubygems-0.9.0.tgz
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

Example:

/testapp$ ./script/server
=> Booting WEBrick…
=> Rails application started on http://0.0.0.0:3000
=> 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

| More
This article was originally written on 12/7/06 Tagged with: Adding Software, Ruby on Rails, Ubuntu

Daily Email Updates

You can get our how-to articles in your inbox each day for free. Just enter your name and email below:


Name:
Email:

Comments (2)

  1. Piku

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

  2. SubbaRao

    Thanks, It helped.


Leave a Comment




Leave your friendly comment here.

If you have a computer help question, click here to leave it on the forums instead.

Note: Your comment may not show up immediately on the site.

Our Friends
Getting Started


About How-To Geek
What Is That Process?
svchost.exe
jusched.exe
dwm.exe
ctfmon.exe
wmpnetwk.exe
mDNSResponder.exe
wmpnscfg.exe
rundll32.exe
wfcrun32.exe
Ipoint.exe
Itype.exe
Wfica32.exe
Mobsync.exe
conhost.exe
Dpupdchk.exe Adobe_Updater.exe

Copyright © 2006-2009 HowToGeek.com. All Rights Reserved.