Forum: Rails deployment Error re-deploying rails app with capistrano

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.
8161659aadd1b5a5284c922022d26ac4?d=identicon&s=25 Alastair Moore (Guest)
on 2007-07-12 21:03
(Received via mailing list)
Hello all,

I'm having a problem re-deploying a rails app with capistrano. It has
been working fine previously but now it's running into the following
error:

"command "sudo  chgrp -R  /var/www/apps/mountainboardmag.co.uk/current/
tmp /var/www/apps/mountainboardmag.co.uk/shared" failed on
www.mountainboardmag.co.uk"

My capistrano deploy log looks like:

cap deploy
  * executing task deploy
  * executing task update
 ** transaction: start
  * executing task update_code
  * querying latest revision...
  * executing "if [[ ! -d /var/www/apps/mountainboardmag.co.uk/
releases/20070712185807 ]]; then\n              svn co --no-auth-
cache   -q -r303 http://alastair@svn.kozmo.co.uk/Kozmo/010MBM/trunk /
var/www/apps/mountainboardmag.co.uk/releases/20070712185807 &&
\n              (test -e /var/www/apps/mountainboardmag.co.uk/
revisions.log || (touch /var/www/apps/mountainboardmag.co.uk/
revisions.log && chmod 666 /var/www/apps/mountainboardmag.co.uk/
revisions.log)) && echo `date +\"%Y-%m-%d %H:%M:%S\"` $USER 303
20070712185807 >> /var/www/apps/mountainboardmag.co.uk/revisions.log;
\n            fi"
    servers: ["www.mountainboardmag.co.uk"]
Password:
    [www.mountainboardmag.co.uk] executing command
    command finished
  * executing task set_permissions
  * executing "chmod -R g+w /var/www/apps/mountainboardmag.co.uk/
releases/20070712185807"
    servers: ["www.mountainboardmag.co.uk"]
    [www.mountainboardmag.co.uk] executing command
    command finished
  * executing "rm -rf /var/www/apps/mountainboardmag.co.uk/releases/
20070712185807/log /var/www/apps/mountainboardmag.co.uk/releases/
20070712185807/public/system &&\n    ln -nfs /var/www/apps/
mountainboardmag.co.uk/shared/log /var/www/apps/mountainboardmag.co.uk/
releases/20070712185807/log &&\n    ln -nfs /var/www/apps/
mountainboardmag.co.uk/shared/system /var/www/apps/
mountainboardmag.co.uk/releases/20070712185807/public/system"
    servers: ["www.mountainboardmag.co.uk"]
    [www.mountainboardmag.co.uk] executing command
    command finished
  * executing "test -d /var/www/apps/mountainboardmag.co.uk/shared/
pids && \n    rm -rf /var/www/apps/mountainboardmag.co.uk/releases/
20070712185807/tmp/pids && \n    ln -nfs /var/www/apps/
mountainboardmag.co.uk/shared/pids /var/www/apps/
mountainboardmag.co.uk/releases/20070712185807/tmp/pids; true"
    servers: ["www.mountainboardmag.co.uk"]
    [www.mountainboardmag.co.uk] executing command
    command finished
  * executing "TZ=UTC find /var/www/apps/mountainboardmag.co.uk/
releases/20070712185807/public/images /var/www/apps/
mountainboardmag.co.uk/releases/20070712185807/public/stylesheets /var/
www/apps/mountainboardmag.co.uk/releases/20070712185807/public/
javascripts -exec touch -t 200707121858.53 {} \\;; true"
    servers: ["www.mountainboardmag.co.uk"]
    [www.mountainboardmag.co.uk] executing command
    command finished
  * executing task after_update_code
  * executing task symlink
  * executing "ls -x1 /var/www/apps/mountainboardmag.co.uk/releases"
    servers: ["www.mountainboardmag.co.uk"]
    [www.mountainboardmag.co.uk] executing command
    command finished
  * executing "ln -nfs /var/www/apps/mountainboardmag.co.uk/releases/
20070712185807 /var/www/apps/mountainboardmag.co.uk/current"
    servers: ["www.mountainboardmag.co.uk"]
    [www.mountainboardmag.co.uk] executing command
    command finished
  * executing task after_symlink
  * executing task set_perms_for_mongrel_dirs
  * executing "sudo  chgrp -R  /var/www/apps/mountainboardmag.co.uk/
current/tmp /var/www/apps/mountainboardmag.co.uk/shared"
    servers: ["www.mountainboardmag.co.uk"]
    [www.mountainboardmag.co.uk] executing command
 ** [out :: www.mountainboardmag.co.uk] chgrp: invalid group `/var/www/
apps/mountainboardmag.co.uk/current/tmp'
    command finished
*** [set_perms_for_mongrel_dirs] transaction: rollback
  * [set_perms_for_mongrel_dirs] rolling back
  * [after_symlink] rolling back
  * [symlink] rolling back
  * executing "ln -nfs /var/www/apps/mountainboardmag.co.uk/releases/
20070710162753 /var/www/apps/mountainboardmag.co.uk/current"
    servers: ["www.mountainboardmag.co.uk"]
    [www.mountainboardmag.co.uk] executing command
    command finished
  * [after_update_code] rolling back
  * [set_permissions] rolling back
  * [update_code] rolling back
  * executing "rm -rf /var/www/apps/mountainboardmag.co.uk/releases/
20070712185807"
    servers: ["www.mountainboardmag.co.uk"]
    [www.mountainboardmag.co.uk] executing command
    command finished
command "sudo  chgrp -R  /var/www/apps/mountainboardmag.co.uk/current/
tmp /var/www/apps/mountainboardmag.co.uk/shared" failed on
www.mountainboardmag.co.uk

Any help would be much appreciated!

Thanks,

Alastair
Fd55097df71dadea1288210b457eb33b?d=identicon&s=25 Chris Lilley (chrisl)
on 2007-07-13 10:30
(Received via mailing list)
Well, it looks to me as though the group argument's missing from the
chgrp command. Is set_perms_for_mongrel_dirs one of your own tasks?
Can you post any elements of your recipe to clarify?

-Chrisl
3a496e19db2f2fbf545406b05ff56b5f?d=identicon&s=25 Lern (Guest)
on 2007-07-19 00:45
(Received via mailing list)
I just started getting this error myself, also with my tmp directory.
I have deployed this application numerous times for the past few
months, and suddenly its failing.

"set_perms_for_mongrel_dirs" is a Capistrano recipe that comes with
mongrel or mongrel_cluster, i believe.  Is there a nice way that i can
ask Capistrano what tasks it knows about or something?  I'll get its
source if i can find it...

Recently i did a gem update, which i know took me from Rails 1.2.2 to
1.2.3, but i'm not sure what else it did.  All i know is that
everything seems fine until i deploy...
8161659aadd1b5a5284c922022d26ac4?d=identicon&s=25 Alastair Moore (Guest)
on 2007-07-23 13:13
(Received via mailing list)
On Jul 13, 9:30 am, Chrisl <chris.lil...@blackpepper.co.uk> wrote:
> Well, it looks to me as though the group argument's missing from the
> chgrp command. Is set_perms_for_mongrel_dirs one of your own tasks?
> Can you post any elements of your recipe to clarify?

Well it turns out it was an issue with the deprec gem i'd installed.
All is back and working again.

Alastair
This topic is locked and can not be replied to.