Capistrano Upgrade Problem

August 31, 2007

A few days ago I ran a sudo gem update and unwittingly got a Capistrano 2.0.0 upgrade that broke my ability to deploy a bunch of existing Rails apps.

cap deploy
the task `deploy' does not exist

Hmm. That sucks. Nick to the rescue. Here’s the culprit:

gem list | egrep -v "^( |$)" 
...
...
capistrano (2.0.0, 1.4.1, 1.4.0)
...
...

Needed to uninstall all the Capistrano gem versions, and install the last working one (apparently 2.0.0 is not backwards compatible with 1.4.1 – which I didn’t know until today).

Here we go:

sudo gem uninstall capistrano -v 2.0.0
sudo gem uninstall capistrano -v 1.4.1
sudo gem uninstall capistrano -v 1.4.0

Say Yes when it asks you to uninstall the cap and capify binaries.

Now let’s install 1.4.1 again:

sudo gem install capistrano -v 1.4.1

Yay! It works! Time to fix those deploy scripts… when I have time.

Comments

There are 4 comments on this post. Post yours →

If at some point you find yourself needing both Cap 1 and 2, you may find these aliases useful:

alias cap1=”`which cap` 1.4.1
alias cap2=”`which cap`”
alias cap=”echo ‘Please explicitly choose cap1 or cap2.’”

Now that I’m actually looking for information on Capistrano 2.0, your #11 result on Google for “capistrano 2.0 howto” is not helpful! :-p

We’re working to document 2.x…

Version 2 brings some pretty spectacular features, but a lot of us have some 1.4.1 deployments out there.

If you want to have both installed, but need to run a 1.4.1 command just go:

cap 1.4.1 [cmd]

e.g.,

cap 1.4.1 deploy_with_migrations

Pax,
Mason

Thank you this saved my ass. Leopard comes pre-installed with Cap 2.0 and I didn’t know that.

Post a comment

Required fields in bold.