Capistrano code_update woes

Hello all.

I am delving into the world of Capistrano and am having problems with
the code_update task (I am using the standard task). My svn repository
is accessible via an svn:// URL and I can login correctly (into a bash
shell) and restart the server using capistrano.

However when I run the code_update task I get the following (this is
probably going to be ugly with word wrapping):

E:\Ruby\Workspace\DOMAIN>cap update_code
loading configuration
C:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.2.0/lib/capistrano/recipes/standard.rb
loading configuration ./config/deploy.rb

  • executing task update_code

  • querying latest revision…

  • executing “if [[ ! -d
    /var/www/vhosts/DOMAIN.com/releases/20060916132026 ]]; then\n
    svn co -q -r46 svn://zeus/DOMAIN/trunk
    /var/www/vhosts/DOMAIN.com/releases/20060916132026 &&\n
    (test -e /var/www/vhosts/DOMAIN.com/revisions.log ||
    (touch /var/www/vhosts/DOMAIN.com/revisions.log && chmod 666
    /var/www/vhosts/DOMAIN.com/revisions.log)) && echo date +\"%Y-%m-%d %H:%M:%S\" $USER 46 20060916132026 >> /var/www
    /vhosts/DOMAIN.com/revisions.log;\n fi”
    servers: [“www.DOMAIN.com”]
    Password: ***************

    [www.DOMAIN.com] executing command
    ** [out :: www.DOMAIN.com] if: Expression Syntax.
    command finished
    C:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.2.0/lib/capistrano/command.rb:45:in
    process!': command "if [[ ! -d /var/www/vhosts/DOMAIN.com/releases/20060 916132026 ]]; then\\\n svn co -q -r46 svn://zeus/DOMAIN/trunk /var/www/vhosts/DOMAIN.com/releases/20060916132026 &&\\\n ( test -e /var/www/vhosts/DOMAIN.com/revisions.log || (touch /var/www/vhosts/DOMAIN.com/revisions.log && chmod 666 /var/www/vhosts/DOMAIN.com /revisions.log)) && echo date +"%Y-%m-%d %H:%M:%S"$USER 46 20060916132026 >> /var/www/vhosts/DOMAIN.com/revisions.log;\\\n fi" failed on www.DOMAIN.com (RuntimeError) from C:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.2.0/lib/capistrano/actor.rb:210:in run’
    from
    C:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.2.0/lib/capistrano/actor.rb:512:in
    execute_on_servers' from C:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.2.0/lib/capistrano/actor.rb:207:in run’
    from
    C:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.2.0/lib/capistrano/scm/base.rb:40:in
    run_checkout' from C:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.2.0/lib/capistrano/scm/subversion.rb:65:in checkout’
    from
    C:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.2.0/lib/capistrano/recipes/standard.rb:71:in
    load' from C:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.2.0/lib/capistrano/actor.rb:159:in update_code’
    from
    C:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.2.0/lib/capistrano/cli.rb:256:in
    execute_recipes!' from C:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.2.0/lib/capistrano/cli.rb:256:in execute_recipes!’
    from
    C:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.2.0/lib/capistrano/cli.rb:233:in
    execute!' from C:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.2.0/lib/capistrano/cli.rb:12:in execute!’
    from C:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.2.0/bin/cap:11
    from C:/ruby/bin/cap:18

E:\Ruby\Workspace\DOMAIN

I am not sure where the problem is and the error messages don’t make
much sense to me. Has anyone else run into something like this?

Thanks

RJ

the error: if Expression syntax means your remote login is using the
csh shell, instead of, say bash that supports doing if’s on the
command line.

Is there anyway to change the shell of your user on the box you’re
deploying too.

you’d have to issue:

sudo usermod -s /bin/bash

there may be a way to ssh in and change your own shell, it’s entirely
possible, but it is a root activity.

hope that helps,

On 9/16/06, RJ [email protected] wrote:

            (test -e /var/www/vhosts/DOMAIN.com/revisions.log ||

C:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.2.0/lib/capistrano/command.rb:45:in
fi" failed on
from
`update_code’
C:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.2.0/lib/capistrano/cli.rb:12:in

RJ


Posted via http://www.ruby-forum.com/.


Charles Brian Q.
self-promotion: www.seebq.com
highgroove studios: www.highgroove.com
slingshot hosting: www.slingshothosting.com

Disregard that.

The usermod command appears to have done the trick. Not sure why it
wasn’t working before because I was always dropping to bash myself. Ah
well.

Many many thanks for the help!

RJ

Charles Brian Q. wrote:

the error: if Expression syntax means your remote login is using the
csh shell, instead of, say bash that supports doing if’s on the
command line.

Hi Charles.

Many thanks for the reply. I am as sure as I can be that I am using the
bash shell and not csh or tcsh (as pointed out in the cap manual). If I
log in as the user Capistrano logs in as I get presented with the Bash
shell:

-bash-3.00$

/etc/passwd has that user as using bash. Just in case I ran the usermod
command as you specificed but capistrano is still reporting the above
error.

Many thanks for the help

RJ