Capistrano 1.1
Posted by jamis March 06, 2006 @ 07:11 PM
Capistrano is a utility for executing tasks in parallel across multiple remote hosts. It was formerly known as SwitchTower.
Installation:
gem install capistrano
Version 1.1 introduces a few changes:
- The generated capistrano.rake file is simpler now than it used to be. You can easily append custom options to individual tasks now. For instance, if you want the deploy to be silent, instead of verbose, just add “-q” to the parameter list for that task.
- The generated capistrano.rake file uses the “remote” namespace, so you’ll need to have at least Rake 0.7.0. You can still do “rake deploy” and “rake rollback”, but the other tasks must be prefixed with the namespace (“rake remote:exec”, “rake remote:show_tasks”, etc.)
- The ‘switchtower’ command is replaced by the ‘cap’ command.
- The cap utility is verbose by default. If you want it to be silent, use the -q option. If you want it to be less verbose, you can specify the -v or -vv flags explicitly.
- The cap utility uses more rake-like command-line semantics. Instead of needing to do “cap -r config/deploy -a deploy”, you can just do “cap deploy”. It will look for config/deploy.rb, capfile, or Capfile automatically, and will treat raw parameters as action names.
Upgrading/switching from SwitchTower to Capistrano is a little inconvenient. Here’s what you’ll need to do:
- gem uninstall switchtower (remove all versions)
- gem install capistrano
- For each of your Rails projects, do “cap -A .”, keeping your deploy.rb
- For each of your Rails projects, remove lib/tasks/switchtower.rake
Enjoy!

I assume the answer to «Remove executables and scripts for ‘switchtower’ in addition to the gem?» should be yes, because cap includes the same “executables and scripts”, right?
Right. It removes the ‘switchtower’ executable.
Lol, for a moment i thought it was called Capitano.
Centuries ago i made a small website for a starving artist in St. Maarten. His name was Capitano Albert. And he made quit psychedelic paintings.
At a very respectable age he enjoyed himself sketching out paintings, scanning them and modifying them in Paint, yes you read that right. Paint…
If you like one of his paintings for maybe a logo or the Capistrano website i can try to figure out who owns the rights to his imagery that can be found on this site:
http://perso.wanadoo.fr/trifan.art/
Although i am a bit ashamed of the site design now: but it is simple, i made it in 2 days, and i did ship It! Oh, and it has big ass buttons :)
oh, this brings directly to his gallery: http://perso.wanadoo.fr/trifan.art/albert_1.html
Capitano…Capistrano…two different things.
Bugsy, yes obviously so, but phonetically they look alike… It just made me smile, but maybe that is my personal humor kicking in…
SwitchTower is dead. Long live Capistrano!
I’m still looking forward to the day when the limitation “The password for all servers is the same” is no longer there.
Running cap -A from the top level of the application (/railsapps/appname directory) I get this error:
c:/ruby/lib/ruby/1.8/optparse.rb:446:in `parse’: missing argument: -A (OptionParser::MissingArgument)
Any helpful ideas?
Bill – You are missing the ’.’ at the end of the line that sets the target directory.
cap -A .
That’s really funny. Thanks Brad.
what, no support for RSA keys in this SwitchTower thingy? you people are going to taunt me into writing some Ruby code afterall, aren’t you… ;-)
what, no support for RSA keys in this SwitchTower thingy? you people are going to taunt me into writing some Ruby code afterall, aren’t you… ;-)
goddamnit! firefox defaults to re-submitting the form when I press space. infuriating. what software does this blog thingy run on, anyways? and where is the SVN repo for it :-)
So here’s the million dollar question; Why did you rename Switchtower to Capistrano?
Ooh, duh… http://weblog.rubyonrails.com/articles/2006/03/06/switchtower-is-now-capistrano
I am also looking forward to when multiple passwords for multiple servers may be set…
Switchtower: Brilliant name
Capistrano: WTF? Sounds like a new special offering at Olive Garden
j/k ;-)
I believe that to be more complete, the upgrade instructions should include:
svn rm lib/tasks/switchtower.rake svn add lib/tasks/capistrano.rake
so everything ends up in svn!
I believe that to be more complete, the upgrade instructions should include:
svn rm lib/tasks/switchtower.rake svn add lib/tasks/capistrano.rake
so everything ends up in svn!
Sorry for the dup, guys. My browser didn’t refresh :(
You might want to check this blog in IE 6.0 because the layout is seriously broken. BTW I’m at work, so can’t switch to a better browser.
You may want to update the main documentation page link text, to change the name from ‘SwitchTower’ to ‘Capistrano’.
“BTW I’m at work, so can’t switch to a better browser.”
If you can buy a lawyer you can charge people for the very air they breathe :(
Windows, Mandrake have been in the dictionnary for centuries but are now privately held. Now Switchtower !
Where will that legal plundering stop ?