# Capistrano 2.1.0; using /u/apps even though deploy\_to set

**URL:** <https://www.ruby-forum.com/t/capistrano-2-1-0-using-u-apps-even-though-deploy-to-set/122442>\
**Category:** Deployment\
**Created:** [December 7, 2007, 5:18pm UTC](https://www.ruby-forum.com/t/capistrano-2-1-0-using-u-apps-even-though-deploy-to-set/122442 "2007-12-07T17:18:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![paul-au](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/f475e1/32.png) [@paul-au](https://www.ruby-forum.com/u/paul-au)\
**Post date:** [December 7, 2007, 5:18pm UTC](https://www.ruby-forum.com/t/capistrano-2-1-0-using-u-apps-even-though-deploy-to-set/122442/1 "2007-12-07T17:18:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![paul-au](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/f475e1/32.png) [@paul-au](https://www.ruby-forum.com/u/paul-au)\
**Post date:** [January 29, 2008, 2:28pm UTC](https://www.ruby-forum.com/t/capistrano-2-1-0-using-u-apps-even-though-deploy-to-set/122442/2 "2008-01-29T14:28:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![paul-au](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/f475e1/32.png) [@paul-au](https://www.ruby-forum.com/u/paul-au)\
**Post date:** [January 29, 2008, 3:19pm UTC](https://www.ruby-forum.com/t/capistrano-2-1-0-using-u-apps-even-though-deploy-to-set/122442/3 "2008-01-29T15:19:16Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![paul-au](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/f475e1/32.png) [@paul-au](https://www.ruby-forum.com/u/paul-au)\
**Post date:** [January 29, 2008, 3:25pm UTC](https://www.ruby-forum.com/t/capistrano-2-1-0-using-u-apps-even-though-deploy-to-set/122442/4 "2008-01-29T15:25:02Z")

</div>

Bastien Vaucher wrote:

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

Ok, solution found ([http://dev.rubyonrails.org/ticket/9172](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.

---

<div class="post-metadata">

**Author:** ![paul-au](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/f475e1/32.png) [@paul-au](https://www.ruby-forum.com/u/paul-au)\
**Post date:** [January 29, 2008, 7:20pm UTC](https://www.ruby-forum.com/t/capistrano-2-1-0-using-u-apps-even-though-deploy-to-set/122442/5 "2008-01-29T19:20:44Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![paul-au](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/f475e1/32.png) [@paul-au](https://www.ruby-forum.com/u/paul-au)\
**Post date:** [June 28, 2008, 4:55am UTC](https://www.ruby-forum.com/t/capistrano-2-1-0-using-u-apps-even-though-deploy-to-set/122442/6 "2008-06-28T04:55:34Z")

</div>

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](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 🙂
