O'Reilly logo

Capistrano and the Rails Application Lifecycle by Tom Mornini, Marc Loy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Capistrano Reference

Well, that about wraps up our tour of Capistrano. You can see its power and appeal. It will be getting better and more popular—and exponentially more useful. Just to make sure you’ve seen all the plumbing, this section provides reference lookup bits on the cap command itself and the environment variables that get used by various built-in tasks. The next section is more of an appendix and provides some quick bootstrap information for both SSH and Subversion.

Good luck with your application and getting it cap-ified. Without hesitation, it is the best time you can spend not coding directly on your application. If Lincoln were alive and worrying about web applications rather than trees, he’d spend his six hours tweaking his Capistrano recipes.[1]

cap Command Reference

The cap utility itself does have several options you can provide, shown in Table 1. In particular, you may often want to adjust how much information you see while running tasks with the -q and -v options. The -a and -r options also let you build fancier single-line commands to perform multiple actions from a variety of recipe source files.

Table 1. Table 6-1. cap command-line arguments

ArgumentDefault?Description

-a --action

 An action to perform. Multiple actions are allowed and are performed in the order given.

-A --apply-to

 Sets up the minimal starting pieces inside an existing Rails application.

-h --help

 Prints out a help message with descriptions of each of these options.

--no-pretend

YForces the commands ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required