That worked spectacularly. Switching the references from #{deploy_to} to
#{fetch(:deploy_to)} did the trick and the files are now being loaded and
generated properly, and in place.
I can't thank you enough!
On Monday, June 4, 2012 4:06:23 AM UTC-4, Lee Hambley wrote:
>
> Chris,
>
> Try using fetch(:deploy_to), this should wait until the call to the task
> is made before attempting to resolve the variable value; as you have it
> right now, the strings will be interpolated when the files are loaded.
>
> Let me know if that brings you any further forwards!
>
> - Lee
>
> On 2 June 2012 23:24, Chris Van Patten wrote:
>
>> Hi Capistrano group-
>>
>> I'm fairly new to Ruby, but having an awesome time learning as I set up
>> Capistrano. Unfortunately I've run into a bit of trouble with multiple
>> stages and the `deploy_to` setting not always working. Here's the info:
>>
>> Multistage is working great (using the bundled multistage system), and
>> `cap staging deploy` and `cap production deploy` do put things where I
>> would expect.
>>
>> The problem is, I have some extra actions (to do some things with Nginx).
>> My production.rb looks like this:
>> https://gist.github.com/1dde30d8823e16db6a8e and my staging looks almost
>> identical, except the deploy_to path is
>> `/home/site/staging.site.com/`<http://staging.site.com/>
>> .
>>
>> Like I said, everything is being deployed properly, but the extra actions
>> I've built only work in staging... not production. When they're executed in
>> production, the `deploy_to` path is the same as the `deploy_to` path from
>> staging, which is of course wrong. It also pulls my "domain_name" setting
>> from staging (which is set to staging.site.com there) which means my
>> nginx configs are generated wrong... and not so great things happen :)
>>
>> I googled around and couldn't find anything that specifically addressed
>> this problem, but I did see some recommendations to fix `deploy_to`
>> wonkiness with an alternate syntax, which I'm now using (see lines 7-11 in
>> my production.rb, linked above). Unfortunately, it still hasn't fixed the
>> problem.
>>
>> Hopefully it's something incredibly simple that I'm overlooking, being
>> new to Ruby!
>>
>> Thanks in advance, and if I can clarify anything further or provide more
>> details I'd be more than happy to!
>>
>> Chris Van Patten
>>
>> --
>> * You received this message because you are subscribed to the Google
>> Groups "Capistrano" group.
>> * To post to this group, send email to [email protected]
>> * To unsubscribe from this group, send email to
>> [email protected] For more options, visit this
>> group at http://groups.google.com/group/capistrano?hl=en
>
>
>
--
* You received this message because you are subscribed to the Google Groups
"Capistrano" group.
* To post to this group, send email to [email protected]
* To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/capistrano?hl=en