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 > now am trying to move to using a multistage deploy recipe. Based on > what I see in the recipe's book and in this blog post > (http://weblog.jamisbuck.org/2007/7/23/capistrano-multistage > ) I was kind of expecting capistrano-ext to magically read the stage > file for the stage I am asking for. But it doesn't seem to be. Am I > supposed to require the files within the deploy directory > explicitly? The Adv Rails Recipes article had some stage specific > tasks (p 348) but I thought the article said they were superseded by > putting files in a deploy directory. Did I misunderstand that? > > A version of the info below with syntax highlighting is at > http://pastie.org/492115 > > My Capfile (as generated with 'capify') > # Capfile > load 'deploy' if respond_to?(:namespace) # cap2 differentiator > > Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) } > > load 'config/deploy' > Deploy file: > # config/deploy.rb > > > default_run_options[:pty] = true > > ssh_options[:forward_agent] = true > > puts "line 3" > # Overwrite the default deploy start/stop/restart actions with > passenger ones > > require 'config/deploy/passenger' > > puts "line 6" > set :stages, %w(development staging production) > > set :default_stage, 'development' > > require 'capistrano/ext/multistage' > > puts "line 10" > > server domain, :app, :web > role :db, domain, :primary => true > > Stage-specific file: > # config/deploy/staging.rb > puts "CNK in staging.rb" > > set :user, 'cnk' > set :domain, 'staging-alumni.xxx.edu' > > set :application, 'alumni' > > set :deploy_to, "/srv/www.alumni.xxx.edu/staging" > > > Shell output/error > > # shell output > $ cap staging deploy > > line 3 > CNK in passenger.rb > > line 6 > line 10 > /software/stow/ruby-enterprise-1.8.6-20080709/lib/ruby/gems/1.8/gems/ > capistrano-2.5.5/lib/capistrano/configuration/vari\ > > ables.rb:122:in `method_missing': undefined local variable or method > `domain' for #<Capistrano::Configuration:0x9c4c440\ > > > (NameError) > from ./config/deploy.rb:12:in `load' > And my versions of capistrano and capistrano-ext: > capistrano (2.5.5, 2.5.3, 2.4.3) > capistrano-ext (1.2.1) > > > > -- > Cynthia Kiser > [email protected] > > > --~--~---------~--~----~------------~-------~--~----~ 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.co.uk/group/capistrano?hl=en -~----------~----~----~----~------~----~------~--~---
