Capistrano 2.1.0; using /u/apps even though deploy_to set

Hi,

I am trying to use Capistrano, version 2.1.0, to do a deploy to a local
server and things seemed to be going well; I can capify the application,
I can run cap deploy:setup and it creates the needed directories in my
application path.

However, even though I set the deploy path in my deploy.rb file; when I
run cap deploy:cold, it fails trying to execute deploy:symlink as it is
trying to rm a symlink in the default directory of /u/apps…

This does not exist, hence the failure:

executing `deploy:symlink’

  • executing “rm -f /u/apps/app_name/current && ln -s
    /var/www/sancrionline/releases/20071206234836 /u/apps/app_name/current”
    servers: [“localhost”]
    [localhost] executing command
    *** [err :: localhost] ln: creating symbolic link
    /u/apps/app_name/current' to/var/www/app_name/releases/20071206234836’: No such file or directory
    command finished

Anyone any idea how to tell cap to not try to locate the symlink in the
default directory but use the deploy to setting in the depoy.rb file?

Many Thanks,
Paul

I have exactly the same error, did you find a solution ?

Paul Mcmillan wrote:

Hi,

I am trying to use Capistrano, version 2.1.0, to do a deploy to a local
server and things seemed to be going well; I can capify the application,
I can run cap deploy:setup and it creates the needed directories in my
application path.

However, even though I set the deploy path in my deploy.rb file; when I
run cap deploy:cold, it fails trying to execute deploy:symlink as it is
trying to rm a symlink in the default directory of /u/apps…

This does not exist, hence the failure:

executing `deploy:symlink’

  • executing “rm -f /u/apps/app_name/current && ln -s
    /var/www/sancrionline/releases/20071206234836 /u/apps/app_name/current”
    servers: [“localhost”]
    [localhost] executing command
    *** [err :: localhost] ln: creating symbolic link
    /u/apps/app_name/current' to/var/www/app_name/releases/20071206234836’: No such file or directory
    command finished

Anyone any idea how to tell cap to not try to locate the symlink in the
default directory but use the deploy to setting in the depoy.rb file?

Many Thanks,
Paul

I am getting the same error. It is trying to rm a symlink in default
directory of /u/apps but it is not there as I have set set :deploy_to,
“/home/anil/public_html/#{application}”

anybody have solution for this error?

Bastien Vaucher wrote:

I have exactly the same error, did you find a solution ?

Ok, solution found (http://dev.rubyonrails.org/ticket/9172)
I just changed

set :mongrel_conf, “#{current_path}/config/mongrel_cluster.yml”

to

set(:mongrel_conf) { “#{current_path}/config/mongrel_cluster.yml” }

in my deploy.rb file

The other solution would be to place the “set :mongrel_conf” AFTER the
“set :deploy_to” as the deploy_to has to be defined to provide a correct
current_path, if not it’s the default path that will be used
("/u/apps/#{application}")

Hope this can help you.

Thanks Bastien Vauche, doing following change solved my problem

The other solution would be to place the “set :mongrel_conf” AFTER the
“set :deploy_to” as the deploy_to has to be defined to provide a correct
current_path, if not it’s the default path that will be used
("/u/apps/#{application}")

Hope this can help you.

Bastien Vaucher wrote:

Bastien Vaucher wrote:

I have exactly the same error, did you find a solution ?

Ok, solution found (http://dev.rubyonrails.org/ticket/9172)
I just changed

set :mongrel_conf, “#{current_path}/config/mongrel_cluster.yml”

to

set(:mongrel_conf) { “#{current_path}/config/mongrel_cluster.yml” }

in my deploy.rb file

The other solution would be to place the “set :mongrel_conf” AFTER the
“set :deploy_to” as the deploy_to has to be defined to provide a correct
current_path, if not it’s the default path that will be used
("/u/apps/#{application}")

Hope this can help you.

Bingo! Thanks for tracking that down for us :slight_smile: