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 ...

Get Capistrano and the Rails Application Lifecycle now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.