Beginning Rails: Published

Tuesday, July 24

I’m happy to announce the release of the book I’ve been working on with Cloves Carneiro Jr. and Hampton Catlin: “Beginning Rails: From Novice to Professional.” [cue: sound of champagne cork popping]

Beginning Rails is the practical starting point for anyone wanting to learn how to build dynamic web applications using the Rails framework for Ruby. You’ll learn how all of the components of Rails fit together and how you can leverage them to create sophisticated web applications with less code and more joy.

Pete wrote up a nice article on the Unspace blog, and Colin from CommunityLend made me blush a little with what he wrote. And leave it to Pete to stir up some debate about the trademark of the Rails logo and its resulting absence from the front cover of the book.

Strangely enough, I ordered a copy of the book from Amazon on Sunday and it was just delivered to my door. It’s funny because I haven’t even received my shipment from Apress. As soon as I noticed that Amazon had it in stock, I knew I’d get my grubby hands on a copy faster by ordering it from them. So, I paid $50 for my own book (including costly expedited shipping). Sigh. Hopefully I’ll get my shipment from Apress soon.

Capistrano multi-stage support

Monday, July 23

This is cool. The newest version of Capistrano now supports multiple stages. Like when you want to have different configuration for, say, production, testing, and staging. This is something I’ve been doing manually, which while it works, is not without its quirks.

It’s part of the capistrano extensions plugin (capistrano-ext), which is as easy as gem install capistrano-ext to obtain. Once installed, you simply require the multistage support in your deploy recipe file.

require 'capistrano/ext/multistage'

The best part is how stages are defined. All you have to do is place your stage-specific code in config/deploy/staging.rb and/or config/deploy/production.rb and it will get loaded automatically.

And if your stages aren’t named “production” and “staging,” you can define your own easily. You can then deploy to the staging server with cap staging deploy and to the production server with cap production deploy. And if you want the stating server to be the default, you can save yourself some typing by setting the default stage:

set :default_stage, 'staging'
require 'capistrano/ext/multistage'

For the full announcement, see Jamis Buck’s blog.