Archive for Installing Rails on Ubuntu

Installing Ruby on Rails on Ubuntu Feisty Fawn via RubyGems

Note:

Plan of attack:

This is a quick down and dirty guide to setting up Ruby on Rails in Ubuntu Feisty Fawn. You may notice this is installed into /tmp, I do this so because its universal on all Ubuntu and Linux distributions.

  • Install Ruby
  • Install RubyGems via source
  • Install Ruby on Rails using RubyGems
  • Test Rails installation

Install Ruby

Enter into the Terminal:

sudo apt-get install ruby ri irb

Install RubyGems via source

Note: Latest RubyGems (v0.9.2) as of 25th April 2007
Enter into the Terminal:

cd /tmp
wget http://rubyforge.org/frs/download.php/17190/rubygems-0.9.2.tgz
tar -zxvf rubygems-0.9.2.tgz
cd rubygems-0.9.2
sudo ruby setup.rb

Install Ruby on Rails using RubyGems

Enter into the Terminal:

sudo gem install -y rails


Note: If it fails, try executing sudo gem update Terminal and then execute the command above again.

Test Rails installation

Enter into the Terminal:

rails /tmp/railstest
cd /tmp/railstest
./script/server

Open up Firefox and go to http://localhost:3000, a page should show up indicating a successful installation. Your basically good to go with the minor exception of a database connection.

After…

Generally you’d want some sort of database connection, with the three standards choices being.

  • SQLite:
    If you just want to experiment with Ruby on Rails, I’d recommend using SQLite.
  • MySQL
  • PostgreSQL

Stay tuned!

Comments (7)