These past few weeks, I’ve been tinkering with Ruby on Rails — a few hours hear, an hour there. This afternoon, the web app that I’d been working on, a simple blogging application for my wife, was finally ready to be deployed. I certainly could have deployed the app manually but then I’d have deprived myself of the opportunity to further test just how much I can automate with Ruby.
So I installed the Capistrano gem, pulled out my Rails Cookbook, and went to work. I’m glad to say that the Rails Cookbook’s treatment, although brief, is more than enough to get a Capistrano neophyte, such as myself, off to a good start. However, as so often happens, what began as a simple exploration turned into a multi-hour campaign.
Don’t misunderstand: Capistrano is fairly simple if you have a basic web application — such as the blog I had built. However, the eccentricities of my webhost’s Rails support added to the complexity. Fortunately, several intrepid souls pieced together a wiki page on Dreamhost Capistrano support as well as Dreamhost Ruby on Rails guidance. Ultimately, I was successful.
However, the one peculiarity that I cannot fully account for involves Dreamhost’s handling of subdomains. When creating a subdomain, a directory is created, under your user directory, with the name of the subdomain (i.e., “/home/yourname/yoursubdomainname). This subdomain directory, by default, functions as your subdomain’s htdoc directory. Through the Dreamhost UI, it is possible to specify a directory beneath the subdomain directory to act as the subdomain’s htdoc directory. However, I’m uncertain how Dreamhost implements this feature. In my case, I pointed the subdomain’s htdoc to /myhome/current/public where “current” is a link created by Capistrano to my latest deployment. Oddly, when I deploy a new release, the new release does not appear on the subdomain until I go into the Dreamhost subdomain adminisration page and reapply my htdoc path as described above. Literally, I go into the subdomain administration page and hit “apply” without making any changes. Suddenly, the subdomain’s new release appears.
Other than this one peculiarity, I have to say that I’m overall very pleased with the abundance of information provided by Dreamhost and it’s user community as well as the overall effectiveness of Capistrano.



0 comments ↓
There are no comments yet...Kick things off by filling out the form below.
Leave a Comment