Luke Melia


October 24, 2006

Capistrano and your shell

I’ve just started to use Capistrano to deploy my non-rails sites and ran into a bit of trouble. My web host for these sites is, and I’d already installed the subversion client there.

When trying to deploy using capistrano, I was getting a command failed RuntimeError as well as this odd line in my cap output:

** [out ::] if: Expression Syntax.

I spent a bunch of time chasing down whether something about the command was wrong, perhaps the way it was calling date with the format. But it turns out that the problem was occuring becaue to my pair account user shell was set to csh and not bash. You can check this by running this command within a session on your pair account:

cat /etc/passwd | grep $USER

To set the shell, run the following (also on your pair account):

chsh -s bash

That was the only major issue I ran into. Deployment with capistrano is a beautiful thing!

2 Responses to “Capistrano and your shell”

  1. Moss Collum chimed in:

    Wow, thanks for posting this! I just found this entry while Googling about the exact same problem. Now I’ve switched my shell to bash–something I’d been vaguely wondering how to do for years–and Capistrano works great.

  2. Ben chimed in:

    A bit late, but “echo $SHELL” is probably more reliable than grepping /etc/passwd, especially if they’re using a distributed auth backend (a’la NIS) – though if they are ‘getent passwd ‘ should still tell you what you want to know.

Leave a Reply created 1999. ··· Luke Melia created 1976. ··· Live With Passion!