[capistrano] Re: Multistage deploy does not seem to be reading stage-specific files

2009-06-23 Thread Cyrille
Since I spent 30 mins figuring out how this translates in code, maybe it will help someone else: role(:web) {#{domain}} role(:app) {#{domain}} role(:db) {#{domain}} However, I didn't manage to set :primary to true for the :db role: role(:db) {#{domain}}, :primary = true role(:db) {#{domain},

[capistrano] Re: Multistage deploy does not seem to be reading stage-specific files

2009-06-23 Thread Lee Hambley
If you have already set domain, do this: role :web,domain role :app, domain role :db, domain else, use yours, for the rest, do this: role :db , domain, :primary = truerole(:db , domain, :primary = true) role(:db , domain, {:primary = true}) (that is, right, righter and rightest syntax.

[capistrano] Re: Multistage deploy does not seem to be reading stage-specific files

2009-06-23 Thread Cyrille
Thanks Lee, but I need to defer the evaluation of domain (see thread above for details), hence the block around domain. The problem is that I can't figure out how to set the primary to true while using the block syntax... Cheers Cyrille On Jun 23, 10:14 pm, Lee Hambley lee.hamb...@gmail.com

[capistrano] Re: Multistage deploy does not seem to be reading stage-specific files

2009-06-23 Thread Jamis Buck
Try this: role(:web) { [domain, {:primary = true}] } In other words, the block should return an array corresponding to the arguments you would normally have passed to role(). The first _n_ elements of the array are domain names to assign to the given role, and the last option may be a hash