Capistrano Question

At risk of pissing everyone off, I’ve posted this query to the
Capistrano
mailing list as well - I’m hoping that posting it here might also reveal
some insight:

Hi all!

I have a rails project that I have deployed many times up to a dreamhost
server using Capistrano 1.4.1. I have succesfully deployed with this
recipe
at least 20 times - probably more. I haven’t done a deployment with
this
project, though, since late June of this year.

When I went to deploy today it failed. I pulled down all the latest
stuff
for my rails app from subversion into a new directory first. Is there a
step I should take before running cap deploy here? My server is already
set
up properly… Here’s what ‘cap deploy’ spit out:

  • executing task deploy
  • executing task update
    ** transaction: start
  • executing task update_code
  • querying latest revision…
  • executing “if [[ ! -d
    /home/tdonaghe/joylitest.icuo.us/releases/20071027181905 ]];
    then\n svn export --no-auth-cache -q -r187
    http://www.icuo.us/joyli1
    /home/tdonaghe/joylitest.icuo.us/releases/20071027181905
    &&\nhttp://www.icuo.us/joyli1/home/tdonaghe/joylitest.icuo.us/releases/20071027181905&&\n
    (test -e /home/tdonaghe/joylitest.icuo.us/revisions.log || (touch
    /home/tdonaghe/joylitest.icuo.us/revisions.log && chmod 666
    /home/tdonaghe/joylitest.icuo.us/revisions.log)) && echo date +\"%Y-%m-%d %H:%M:%S\" $USER 187 20071027181905 >>
    /home/tdonaghe/joylitest.icuo.us/revisions.log;\n fi”
    servers: [“joylitest.icuo.us”]
    Password:
    [joylitest.icuo.us] executing command
    command finished
  • executing task set_permissions
  • executing “chmod -R g+w
    /home/tdonaghe/joylitest.icuo.us/releases/20071027181905”
    servers: [“joylitest.icuo.us”]
    [joylitest.icuo.us] executing command
    command finished
  • executing “rm -rf
    /home/tdonaghe/joylitest.icuo.us/releases/20071027181905/log
    /home/tdonaghe/joylitest.icuo.us/releases/20071027181905/public/system
    &&\n ln -nfs /home/tdonaghe/joylitest.icuo.us/shared/log
    /home/tdonaghe/joylitest.icuo.us/releases/20071027181905/log &&\n ln
    -nfs
    /home/tdonaghe/joylitest.icuo.us/shared/system
    /home/tdonaghe/joylitest.icuo.us/releases/20071027181905/public/system”
    servers: [“joylitest.icuo.us”]
    [joylitest.icuo.us] executing command
    ** [out :: joylitest.icuo.us] ln: creating symbolic link
    /home/tdonaghe/joylitest.icuo.us/releases/20071027181905/public/system' to /home/tdonaghe/joylitest.icuo.us/shared/system’: No such file or
    directory
    command finished
    *** [set_permissions] transaction: rollback
  • [set_permissions] rolling back
  • [update_code] rolling back
  • executing “rm -rf
    /home/tdonaghe/joylitest.icuo.us/releases/20071027181905”
    servers: [“joylitest.icuo.us”]
    [joylitest.icuo.us] executing command
    command finished
    command “rm -rf
    /home/tdonaghe/joylitest.icuo.us/releases/20071027181905/log
    /home/tdonaghe/joylitest.icuo.us/releases/20071027181905/public/system
    &&\\n ln -nfs /home/tdonaghe/joylitest.icuo.us/shared/log
    /home/tdonaghe/joylitest.icuo.us/releases/20071027181905/log &&\\n
    ln
    -nfs /home/tdonaghe/joylitest.icuo.us/shared/system
    /home/tdonaghe/joylitest.icuo.us/releases/20071027181905/public/system”
    failed on joylitest.icuo.us

Can anyone tell by look what happened? Right after the chmod command up
near there top, we see an “executing command” and then it finishes.
Then
for some reason, capistrano removes a bunch of directories. Just after
that
we see it trying to create a symlink to one of the directories that it
previously removed?

Does anyone know what’s going on here? Why would it have quit working
like
this? I’m 99% sure I haven’t changed anything - I’ve gone over and over
my
deploy.rb file to try to find something wrong, but it all looks good. I
can
copy and paste that if anyone thinks it would help.

I’m hoping I just forgot something stupid.

Any help is GREATLY appreciated!


Terry (TAD) Donaghe
http://tadspot.tumblr.com

READ CAREFULLY. By reading this email, you agree, on behalf of your
employer, to release me from all obligations and waivers arising from
any
and all NON-NEGOTIATED agreements, licenses, terms-of-service,
shrinkwrap,
clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and
acceptable use policies (“BOGUS AGREEMENTS”) that I have entered into
with
your employer, its partners, licensors, agents and assigns, in
perpetuity,
without prejudice to my ongoing rights and privileges. You further
represent
that you have the authority to release me from any BOGUS AGREEMENTS on
behalf of your employer.

On 2007-10-27 11:34:52 -0700, “Terry D.”
[email protected] said:

`/home/tdonaghe/joylitest.icuo.us/shared/system’: No such file or directory

Capistrano indicates that the deployment directory structure isn’t set
up on the server. You could try:

cap deploy:setup # Prepares one or more servers for
deployment.

–Andrew V.