Not signed in (Sign In)
    • CommentAuthorbdm
    • CommentTimeMar 27th 2007 edited
     permalink
    Hi All,

    Following Jason's HOWTO on deploying a Rails App using Deprec/Capistrano, have had some issues.

    The Local Development Environment is a Kubuntu Edgy Eft machine and the Remote Machine (Slice) is an Ubuntu Edgy Eft server. Both systems are current and up-to-date.

    Following these commands so far;

    $ cap install_full_rails_stack
    $ cap deprec_setup
    $ cap setup_scm

    Works fine, nil errors.

    $ cap deploy_with_migrations

    Fails with this error output, using both 'cap deploy_with_migrations' and 'cap deploy';

    ben@speedymunky:~/project/fourwallsandaroof_machine$ cap deploy_with_migrations
    * executing task deploy_with_migrations
    * executing task update_code
    * querying latest revision...
    Enter passphrase for key '/home/ben/.ssh/id_rsa':
    * executing "if [[ ! -d /var/www/apps/fourwallsandaroof/releases/20070327155358 ]]; then\n svn co --no-auth-cache -q -r3 svn+ssh://deploy@63.97.251.238/var/www/apps/fourwallsandaroof/repos/trunk /var/www/apps/fourwallsandaroof/releases/20070327155358 &&\n (test -e /var/www/apps/fourwallsandaroof/revisions.log || (touch /var/www/apps/fourwallsandaroof/revisions.log && chmod 666 /var/www/apps/fourwallsandaroof/revisions.log)) && echo `date +\"%Y-%m-%d %H:%M:%S\"` $USER 3 20070327155358 >> /var/www/apps/fourwallsandaroof/revisions.log;\n fi"
    servers: ["63.97.251.238"]
    Enter password for /home/ben/.ssh/id_rsa:
    Enter password for /home/ben/.ssh/id_rsa:
    Enter password for /home/ben/.ssh/id_rsa:
    [63.97.251.238] executing command
    ** [out :: 63.97.251.238] sh: [[: not found
    command finished
    * executing task set_permissions
    * executing "chmod -R g+w /var/www/apps/fourwallsandaroof/releases/20070327155358"
    servers: ["63.97.251.238"]
    [63.97.251.238] executing command
    ** [out :: 63.97.251.238] chmod: cannot access `/var/www/apps/fourwallsandaroof/releases/20070327155358': No such file or directory
    command finished
    command "chmod -R g+w /var/www/apps/fourwallsandaroof/releases/20070327155358" failed on 63.97.251.238

    I have spoken to Jason about this and he reckons it is unusual. Have redone the steps again twice and the error remains.

    Anyone seen this before?

    Cheers, Ben.
    •  
      CommentAuthorjason
    • CommentTimeMar 27th 2007
     permalink
    Ben solved the riddle in the chatroom. He dist-upgraded to edgy which changes the default shell from bash to dash which doesn't like the [['s

    To work around, edit /etc/password and change /bin/sh to /bin/bash for your deployment user
    Thankful People: bdm
    • CommentAuthorbdm
    • CommentTimeMar 27th 2007
     permalink
    Jason solved the riddle, I just provided the clues ... he is too modest!