Update 20100922: Apparently this article is so out of date that I even get e-mail to get this article down (or replace it).
Therefore: please do not use this article, in fact don't even rely on the Ubuntu packages as they are not all maintained properly.
One approach that may be fine (I did not try, don't blame me), is on http://krainboltgreene.github.com/l/3/. Good luck!
So now I have a new server, and a new 10Mbit/s internet connection. Its time for some applications! Here are my experiences with installing Rails, Radiant and Camping on a fresh Ubuntu 7.10 server installation. First of all, if your server is running in a closet somewhere (like mine) or worse: in a remote data center, you need to disable apt-get asking for the installation CD. Edit
/etc/apt/sources.listand comment the line that refers to the installation cdrom. The next step of course it to install Ruby and Ruby Gems:
sudo apt-get install ruby rubygems ruby1.8-devWithout the
ruby1.8-devyou can not do much, don't forget it! Where would you be without irb? The default install however does not link it!
sudo ln -s /usr/bin/irb1.8 /usr/bin/irbAny serious Ruby web application uses Mongrel. However, Mongrel compiles some of its stuff during the install. So you first need to get the compilation tools:
sudo apt-get install make gcc libc6Mongrel is a trusted enterprise application nowadays, so you can install it with a certificate:
wget http://rubyforge.org/frs/download.php/25325/mongrel-public_cert.pem gem cert --add mongrel-public_cert.pem rm mongrel-public_cert.pem gem install mongrel --include-dependencies -P HighSecurity
(ruby). Luckily, installing Rails is still a simple:
sudo gem install rails --include-dependenciesIf you want Camping, you'll first need to install sqlite:
sudo apt-get install libsqlite3 libsqlite3-devNow you can:
sudo gem install camping --source http://code.whytheluckystiff.net sudo gem install camping-omnibus --source http://code.whytheluckystiff.net
sudo gem install radiantFor some reason the gem executables do not get added to the path. Make sure they do by adding
/var/lib/gems/1.8/binto your path. For example by adding the following line at the end of
export PATH="$PATH:/var/lib/gems/1.8/bin". The favorite database amongst Railers is of course MySQL. I assume you selected LAMP during the Ubuntu server installation, that means you already have MySQL installed. To use MySQL with ActiveRecord, its best to install the MySQL native adapter. Before you can install that, you first need to install all the compile stuff from above and some more:
sudo apt-get install libmysqlclient15-dev sudo gem install mysqlAgain, for the gem select highest version number followed by
(ruby). Have fun!