SwitchTower rake deply failure on DreamHost


#1

I’ve been following some tutorials on how to get switchtower working on
dreamhost. I got the setup to work just fine, but the rake deploy
doesn’t work. I get the following error. any ideas?

rake deploy
(in /home/.interim/i8ramin/work/yaram.com)
loading configuration
/home/i8ramin/.gems/gems/switchtower-1.0.1/lib/switchtower/recipes/standard.rb
loading configuration ./config/deploy.rb

  • executing task deploy
    ** transaction: start

  • executing task update_code

  • querying latest revision…

  • executing “if [[ ! -d
    /home/i8ramin/domains/yaram.com/releases/20060228064451 ]]; then\n
    svn co -q -r5 http://repo.yaram.com/svn/trunk
    /home/i8ramin/domains/yaram.com/releases/20060228064451 &&\n
    (test -e /home/i8ramin/domains/yaram.com/revisions.log || touch
    /home/i8ramin/domains/yaram.com/revisions.log && chmod 666
    /home/i8ramin/domains/yaram.com/revisions.log) && echo date +\"%Y-%m-%d %H:%M:%S\" $USER 5 20060228064451 >>
    /home/i8ramin/domains/yaram.com/revisions.log;\n fi”
    servers: [“yaram.com”]
    Password: **********

    [yaram.com] executing command
    ** [out :: yaram.com] if: Expression Syntax.
    command finished
    *** [update_code] transaction: rollback

  • [update_code] rolling back

  • executing “rm -rf
    /home/i8ramin/domains/yaram.com/releases/20060228064451”
    servers: [“yaram.com”]
    [yaram.com] executing command
    command finished
    rake aborted!
    command “if [[ ! -d
    /home/i8ramin/domains/yaram.com/releases/20060228064451 ]]; then\\n
    svn co -q -r5 http://repo.yaram.com/svn/trunk
    /home/i8ramin/domains/yaram.com/releases/20060228064451 &&\\n
    (test -e /home/i8ramin/domains/yaram.com/revisions.log || touch
    /home/i8ramin/domains/yaram.com/revisions.log && chmod 666
    /home/i8ramin/domains/yaram.com/revisions.log) && echo date +\"%Y-%m-%d %H:%M:%S\" $USER 5 20060228064451 >>
    /home/i8ramin/domains/yaram.com/revisions.log;\\n fi” failed
    on yaram.com

Exit 1


#2

Ramin,

I already replied to you directly, but I figured I’d post the answer
here as well in case anyone else is running up against this.

The symptom of the issue is the following bit in the output:

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

This is your shell rejecting the “if” syntax that SwitchTower is
using, and it means that you are not using a POSIX compatible shell
on your remote host(s). Probably you have something like csh or tcsh
configured right now. In order to use ST, you’ll need to change your
remote host to use something like bash, ksh, or zsh–basically any
shell that understands POSIX shell syntax.

Hope that helps,

Jamis


#3

Jamis B. wrote:

Ramin,

I already replied to you directly, but I figured I’d post the answer
here as well in case anyone else is running up against this.

The symptom of the issue is the following bit in the output:

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

This is your shell rejecting the “if” syntax that SwitchTower is
using, and it means that you are not using a POSIX compatible shell
on your remote host(s). Probably you have something like csh or tcsh
configured right now. In order to use ST, you’ll need to change your
remote host to use something like bash, ksh, or zsh–basically any
shell that understands POSIX shell syntax.

Hope that helps,

Jamis

I actually was using tcsh. I will switch to bash now and try again.
Thank you so much for your assistance.