Capistrano 2.5.11 Latest Release Workaround

Posted by Christopher Rigor on January 5, 2010 
Filed Under Web Development

A recent commit in Capistrano broke some of the deploys. The latest_release directory becomes the oldest release instead of the most recent. Some of the effects I’ve seen are: 1) rake db:migrate is run on the oldest release 2) deploy:cleanup deletes the most recent releases.

When you deploy, and the number of releases directories exceed keep_releases, deploy:cleanup would delete the directory that you’re trying to deploy. You’ll end up with current that symlinks to a missing directory.

You can follow the ticket on lighthouse. In the meantime, you can use a workaround. On your deploy.rb, add

set :releases, lambda { capture("ls -x #{releases_path}").split.sort }

Comments

  • Lee Hambley

    This has been fixed in 2.5.12 which was released a few minutes ago; apologies for the interuption disruption and grief caused!

  • crigor

    Thanks Lee!

blog comments powered by Disqus