Saturday, October 9, 2010

Installing Rails 3 in Ubuntu 10.4

For the record, and for those of my friends who are going to participate in the Rails Rumble next weekend: here's how you install Rails 3 on your Ubuntu Karmic system. (10.10, known as Maverick, is supposed to arrive tomorrow and might make this post obsolete. But I won't be risking an upgrade before the weekend.)

  1. Install Ruby; apt contains the required version:
    sudo apt-get install ruby
  2. Uninstall RubyGems, because we'll install a more recent version from source:
    sudo apt-get remove rubygems
  3. Install RubyGems from source:
    cd /tmp
    tar xzf rubygems-1.3.7.tgz
    cd rubygems-1.3.7
    sudo ruby setup.rb
    sudo ln -s gem1.8 /usr/bin/gem
  4. Install Rails:
    sudo gem install rails