Rails Deployment Tinkering

So I developed my first little Rails application recently.

Given how RAD-y” and agile the development process feels in the Rails framework (at least compared to something like Spring MVC + Hibernate), I was expecting the actual deployment of the thing to be a breeze.

I was wrong.

Rails deployment is done using a tool or framework called Capistrano. Capistrano kinda resembles Rake; you define tasks and variables in a deploy script (like a Rakefile), hooking it directly to your SCM system of choice (Subversion in my case). Running the Capistrano deployment tasks then refreshes your Rails server environment with the latest and greatest version of your application, directly from the repository (Capistrano can be used for automating a bunch of other remote tasks too).

Actually making this process work as expected took me a whole evening, several cups of coffee and occasional copious swearing. I don’t recall every roadblock I encountered, but the following two were the big (ie. most time-consuming) gotchas for me:

What did I learn? The Rails deployment process feels somewhat fragile and fiddly; so set up and test the deployment routine before seriously starting development on your application. The actual changes (of which the two above were just the most annoying ones) I had to make to my application and configuration were small. They would, however, have been a bigger pain to debug and implement late in a bigger project with some momentum. Possible final disclaimer: disregarding PEBCAK on my part, some of the problems could be due to the Rails configuration on the shared host I’m using for my domain(s). Site 5 has been very good for me so far but I’ve read some rumblings about their Rails support in the support forums.