capistrano errors when running `cap migrate`

B N
Thu, 14 Sep 2006 11:22:23 -0000

Hello all,
  I can deploy, enable/disable_web, cleanup, restart and so forth, but
I am unable to migrate without errors.

When I am on the server I can run `rake RAILS_ENV="production"
migrate`
successfully. When I run cap migrate:
  * executing task migrate
  * executing "cd /var/www/localhost/rails_test/current && rake
RAILS_ENV=production  migrate"
/opt/local/lib/ruby/gems/1.8/gems/capistrano-1.1.0/lib/capistrano/actor.rb:416:in

`execute_on_servers'': The migrate task is only run for servers matching
{:only=>{:primary=>true}, :roles=>:db, :desc=>"Run the migrate
rake
task. By default, it runs this in the version of the app\nindicated by
the ''current'' symlink. (This means you should not invoke this
task\nuntil the symlink has been updated to the most recent version.)
However, you\ncan specify a different release via the migrate_target
variable, which must be\none of \"current\" (for the default
behavior),
or \"latest\" (for the latest release\nto be deployed with the
update_code task). You can also specify additional\nenvironment
variables to pass to rake via the migrate_env variable. Finally,
you\ncan specify the full path to the rake executable by setting the
rake variable.\n"}, but no servers matched (RuntimeError)

My deploy file specifies:
task :switch_to_production do
  set :use_sudo, false
  set :user, "root"
  role :web, "mysite.com"
  role :app, "mysite.com"
  role :db,  "mysite.com"
  set :deploy_to, "/var/www/localhost/rails_test"
  set :rails_env, "production"
end

task :migrate_production do
  switch_to_production
  migrate
end

I have similar task :whatever_production ones that work (as I''d
mentioned). Any ideas?
Thanks in advance for any advice.