The maze book for programmers!

Algorithms, circle mazes, hex grids, masking, weaving, braiding, 3D and 4D grids, spheres, and more!

DRM-Free Ebook

The Buckblog

assorted ramblings by Jamis Buck

Capistrano 1.4.0

3 February 2007 — 2-minute read

Today sees the release of Capistrano 1.4.0. Capistrano is a utility for executing commands in parallel on multiple machines, such as for automating the deployment of applications.

To install:

gem install capistrano

Version 1.4.0 fixes a few bugs, and adds a few features. The new features:

  • A “capture” helper has been added, to make it easy to capture the stdout of a remote command and return it as a string:

    result = capture(“uptime”)

  • A “get” helper has been added, to mirror the “put” command, letting you easily download files from a remote server to the local host. It will only download from the first server that matches the criteria for the current task. You must have Net::SFTP installed (gem install net-sftp) in order to use the “get” helper.

    get ”#{current_path}/log/production.log”, “logs/production.log”

  • Support for a system-wide config file has been added. If a file exists in ”/etc/capistrano.conf”, it will be loaded immediately after the standard recipe file is loaded, and immediately before any user-specific configuration.

The fixed bugs:

  • There used to be issues with cap hanging when running multiple capistrano instances at the same time when using gateways. This has been fixed.
  • The permissions tweaking in the standard recipe has been refactored into a separate task (set_permissions), which you can override if you are on a host that won’t let you set group-writable permissions.
  • The setup task now uses umask so that intermediate directories are created with the proper permissions.
  • Make sure the standard recipe loads first, so that .caprc and friends can oerride what it defines.
  • cold_deploy now calls update instead of deploy, to avoid invoking the restart task.
  • The ‘touch’ command in update_code now sets TZ to UTC for the duration of that command, so that asset timestamps are set correctly.
  • An off-by-one bug in the width computation for show_tasks has been fixed.

Minor deprecations:

  • The c/-caprc switch has been removed, since the new load order (standard, system, user, application) makes it meaningless.

Thanks to Mark Imbriaco, Neil Wilson, and Mike Bailey for their contributions to this release.

Update 4 Feb: Also thanks to Bojan Mihelac and Joshua Wehner for contributing patches (sorry I didn’t know your names earlier!).

Reader Comments

Let me be the first to says thanks all! Capistrano makes software deployment a joy, and these updates just keep giving.

thanks Jamis,

I use Capistrano but really can’t find a good or easy documentation besides the one on the rails manual (book 17) which I don’t know if it gets updated.

Any help with this? like for example, how to manage capistrano with sqlite projects? a good recipe to move/copy the sqlite to the ‘shared’ folder after deploy?

sorry, It might be just me

mano, sadly, documentation is very, very lacking with Capistrano right now. I no longer have access to the rails manuals and so cannot update that book. I’m working on other documentation options, but my plate is very, very full at the moment.

Note, though, that capistrano+sqlite is beyond the scope of any manual I would write; it’s far too specific. Please feel free to join the Capistrano mailing list at Google groups. There are a lot of people there who would be more than willing to share advice on many different usage scenarios.

So, I created a Stikipad wiki:

Posted about it in the group. Let’s hope we’ll get some proper docs soon.

“bmihelac” is Bojan Mihelac [1], a very active Core contributor; and jaw6 is Joshua Wehner [2].

[1] [2]

p.s. WWR is sweet! :) helps you find people

Thanks, Mislav. I’ve updated the announcement.