deploy_to for current_path?

Showing 1-11 of 11 messages
deploy_to for current_path? sol 7/11/07 11:49 AM
Hey,

Shouldn't deploy_to affect the current_path var?

I set deploy_to to /var/apps, and if I try to cap restart, it still
uses the /u/ prefix.
release_path uses the correct /var/apps prefix.

my version: 1.99.2

thanks,
Christoph

Re: [Capistrano] deploy_to for current_path? Jamis Buck 7/11/07 11:54 AM
Can you show me your deploy.rb file?

- Jamis

Re: deploy_to for current_path? sol 7/11/07 12:05 PM
I think I could clean it up a bit, but I don't have the time right
now, so it might seem a bit confusing :)

http://pastie.caboo.se/78103

On Jul 11, 8:54 pm, "Jamis Buck" <j...@37signals.com> wrote:
> Can you show me your deploy.rb file?

Re: [Capistrano] Re: deploy_to for current_path? Jamis Buck 7/11/07 12:20 PM
I wonder if something in mongrel_cluster/recipes is grabbing
current_path before you set the deploy_to variable... you might try
moving that require below where you set deploy_to and see what
happens.

- Jamis

On 7/11/07, sol <ch.b...@gmail.com> wrote:
>

Re: deploy_to for current_path? sol 7/11/07 12:29 PM
I removed it, but it still uses /u/ for current_path
Re: [Capistrano] Re: deploy_to for current_path? Jamis Buck 7/11/07 12:42 PM
In the pastie, there is a line that says:

  # some custom app vars here

Is that literally in your file, or did you elide some content before
pastie-ing it? Also, how are you testing the value of current_path?

- Jamis

On 7/11/07, sol <ch.b...@gmail.com> wrote:
>

Re: deploy_to for current_path? sol 7/11/07 12:53 PM
I tested with the restart task, which uses the current_path, and I
just printed out the vars, which seems to show the correct values.

I removed some lines where you see "# some custom app vars here" but
thats mainly usernames, password and vars for my custom tasks, like
nginx server aliases.
I don't think that this affects the path though.

On Jul 11, 9:42 pm, "Jamis Buck" <j...@37signals.com> wrote:
> In the pastie, there is a line that says:
>
>   # some custom app vars here
>
> Is that literally in your file, or did you elide some content before
> pastie-ing it? Also, how are you testing the value of current_path?
>
> - Jamis

Re: [Capistrano] Re: deploy_to for current_path? Jamis Buck 7/11/07 12:56 PM
Do any of those elided variables themselves refer to any standard
capistrano variable, like deploy_to or current_path or release_path,
etc?

Can you show me the restart task, with your changes in it?

- Jamis

On 7/11/07, sol <ch.b...@gmail.com> wrote:
>

Re: deploy_to for current_path? sol 7/11/07 1:03 PM
> Do any of those elided variables themselves refer to any standard
> capistrano variable, like deploy_to or current_path or release_path,
> etc?

hm, one var does:
set :mongrel_conf, "#{current_path}/config/mongrel_cluster.yml"
the others are just some strings like username, domainname, etc

> Can you show me the restart task, with your changes in it?

I meant the deploy:restart task, it uses /u/ if I try it, I did not
change anything.
also printing those vars to stdout shows the wrong path (after
deploy_to)

Re: [Capistrano] Re: deploy_to for current_path? Jamis Buck 7/11/07 1:17 PM
Yup, that set :mongrel_conf is the culprit. Try this instead:

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

Putting it in braces forces it to be evaluated lazily, when it is
first needed. Which will hopefully be after you've changed the
:deploy_to variable.

- Jamis


On 7/11/07, sol <ch.b...@gmail.com> wrote:
>

Re: deploy_to for current_path? sol 7/11/07 1:31 PM
Ah you're right :)

Thanks a lot Jamis, although I should have noticed this myself :)

On Jul 11, 10:17 pm, "Jamis Buck" <j...@37signals.com> wrote:
> Yup, that set :mongrel_conf is the culprit. Try this instead:
>
> set(:mongrel_conf) { "#{current_path}/config/mongrel_cluster.yml" }
>
> Putting it in braces forces it to be evaluated lazily, when it is
> first needed. Which will hopefully be after you've changed the
> :deploy_to variable.
>
> - Jamis