First, a few of the packages that are essential to my use of Ubuntu.
$ sudo apt-get install screen # learn about screen here
$ sudo apt-get install build-essential
We need to use the universe repository for some of the ruby essentials. Universe is not on by default because it has no guarantee of maintenance and security updates.
You need to open up the sources file and uncomment the universe repository.
$ sudo vim /etc/apt/sources.list
The lines that you need to uncomment will look something like this:
deb http://us.archive.ubuntu.com/ubuntu/ dapper universe
deb-src http://us.archive.ubuntu.com/ubuntu/ dapper universe
Now let's install ruby:
$ sudo apt-get install ruby ruby1.8-dev
$ sudo apt-get install rdoc1.8
$ wget http://rubyforge.org/frs/download.php/20989/rubygems-0.9.4.tgz
$ tar -xzf rubygems-0.9.4.tgz
$ cd rubygems-0.9.4/
$ sudo ruby setup.rb
$ cd ..
We now have all of the essential pieces of ruby. It's time to install rails
$ sudo gem install rails --include-dependencies
If you get "Could not find rails (> 0) in any repository" read this.
Now that rails is installed, let's make sure it works.
$ rails testapp
$ cd testapp/
$ruby script/server webrick
Now browse to your rails app (you will need to use the ip instead of localhost if you are browsing from a different box)
http://localhost:3000/
Looking good so far, but you will most likely want a database.
$ sudo apt-get install mysql-server mysql-common mysql-client mytop
$ sudo apt-get install libmysqlclient15-dev
$ sudo gem install mysql # optional but trust me, you want it
Now that rails is installed, let's make sure it works.
$ rails testapp
$ cd testapp/
$ruby script/server webrick
Now browse to your rails app (you will need to use the ip instead of localhost if you are browsing from a different box)
http://localhost:3000/
Looking good so far, but you will most likely want a database.
$ sudo apt-get install mysql-server mysql-common mysql-client mytop
$ sudo apt-get install libmysqlclient15-dev
$ sudo gem install mysql # optional but trust me, you want it



