Thanks Jamis,
it works great!
Cyrille
On Jun 24, 4:17 pm, Jamis Buck ja...@37signals.com wrote:
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_
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},
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.
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
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
Nick,
I don't think that still applies if using the Multistage extension?
- Lee
2009/5/28 Nick Howard ndh.000...@gmail.com
for $ cap staging deploy to work, you need to wrap your staging server
setup in a capistrano task.
You also need to require all the files with tasks in them in your
Hello,
puts line 10
server domain, :app, :web
role :db, domain, :primary = true
It seems that the problem is located here. You are trying to access the
domain variable before it is set (the variable will be set only when the
staging task is called, after all the necessary files are parsed.
It seems that the problem is located here. You are trying to access the
domain variable before it is set (the variable will be set only when the
staging task is called, after all the necessary files are parsed.
It is possible to use a block for the role directive, which will be
evaluated
Cynthia,
You need to pass the stage on the command line
cap -v integration deploy:setup
Peter
On May 27, 2009, at 7:47 PM, Cynthia Kiser wrote:
I am using the article from Advanced Rails Recipes as a model for my
deploy. I finally corrected all my errors with a normal deploy and
for $ cap staging deploy to work, you need to wrap your staging server setup
in a capistrano task.
You also need to require all the files with tasks in them in your deploy.rb
so the staging file could look like:
task :staging do
puts CNK in staging.rb
set :user, 'cnk'
set :domain,
10 matches
Mail list logo