Dapper is a few weeks behind in integrating the RoR v1.1 Debian package. Only 1.o is available at the moment, but 1.1 should be available in the final relase of Dapper, so in a few weeks you’ll only need to ‘apt-get install rails’.
For now, I’ll use rubygems to install RoR. First, you need to have Ruby installed:
sudo apt-get install ruby
Next, following the download instructions on rubyonrails.org: wget the rubygems software, install it, use it to install rails.
tar -zxvf rubygems-0.8.11.tgz
sudo ruby setup.rb
sudo gem install rails --include-dependencies
I put my app in ~/src/app1 for now. Next, open the provided url in your browser and follow the instructions there. I want to use PostgreSQL as my database backend. I also want to use subversion for revision control. Each one requires a bit of extra setup.
sudo apt-get install postgresql-8.1 subversion
sudo gem install postgres-pr
Instructions for setting up PostgreSQL can be found in /usr/share/doc/postgresql-8.1/README.Debian.gz. I will create a PSQL user with the same username as my account, and make the dbs for the app1. It might be a good idea to also set a password for the databases, but I won’t do it. Lastly, modify the database.yml file with the appropriate adapter: postgresql and user: alex.
sudo -u postgres sh
createuser -DRS alex
createdb -O alex app1_development
createdb -O alex app1_test
createdb -O alex app1_production
I’ll make the subversion repository in my home directory with instructions from /usr/share/doc/subversion/README.gz. We blow away the original code after import, which isn’t very safe. It’s ok in this case because our app can be regenerated with a couple of commands.
svnadmin create ~/app1svnrepo
mv app1 trunk
mv trunk/* app1/trunk
svn import ~/src/app1 file:///home/alex/app1svnrepo -m "Initial import"
rm -r ~/src/app1
svn checkout file:///home/alex/app1svnrepo/ app1
Now you can work on creating your app.