I was able to get it working like this, but it seems awkward. In
deploy.rb:
set(:stage_domain) { "#{domain}" }
set(:vhost) { "/var/www/#{stage_domain}" }
set(:repo_dir) { "#{vhost}/repository" }
set(:deploy_to) { "#{repo_dir}" }
set(:httpdocs_link) { "#{deploy_to}" }
role(:web) { stage_domain }
On Nov 9, 2:33 pm, devth <[email protected]> wrote:
> I'm pretty sure I'm going about this wrong, but am not sure what the
> right way to do this is.
>
> When using ext/multistage, the variables that are set in a stage
> (production.rb) don't seem to be immediately available in deploy.rb.
>
> In production.rb:
> set :domain, "domain.com"
>
> In deploy.rb:
> set :vhost, "/var/www/#{domain}"
>
> When I try to run, it complains:
>
> undefined local variable or method `domain' for
> #<Capistrano::Configuration:0x00000100d07248> (NameError)
>
> I really just want my different stages to set different domains (or
> roles?), and base my other variables off that.
--
* 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