Forum: Ruby on Rails SwitchTower rake deply failure on DreamHost

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B7c24a7df391a1c318a90974537afc43?d=identicon&s=25 Ramin Bozorg (i8ramin)
on 2006-02-28 07:46
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
992fe8c19bbbc27f2b562a9f96efc03d?d=identicon&s=25 Jamis Buck (Guest)
on 2006-02-28 16:45
(Received via mailing list)
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
B7c24a7df391a1c318a90974537afc43?d=identicon&s=25 Ramin Bozorg (i8ramin)
on 2006-02-28 16:52
Jamis Buck 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.
This topic is locked and can not be replied to.