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. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
B N wrote:> 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. > > ------=_Part_7169_12225120.1158232943016 > Content-Type: text/html; charset=ISO-8859-1 > X-Google-AttachSize: 2205 > > Hello all, <br> I can deploy, enable/disable_web, cleanup, restart and so forth, but <br> I am unable to migrate without errors. <br> <p>When I am on the server I can run `rake RAILS_ENV="production" migrate` <br> > successfully. When I run cap migrate: <br> * executing task migrate <br> * executing "cd /var/www/localhost/rails_test/current && rake <br> RAILS_ENV=production migrate" <br> /opt/local/lib/ruby/gems/1.8/gems/capistrano- > 1.1.0/lib/capistrano/actor.rb:416:in <br> `execute_on_servers'': The migrate task is only run for servers matching <br> {:only=>{:primary=>true}, :roles=>:db, :desc=>"Run the migrate rake <br> task. By default, it runs this in the version of the app\nindicated by > <br> the ''current'' symlink. (This means you should not invoke this <br> task\nuntil the symlink has been updated to the most recent version.) <br> However, you\ncan specify a different release via the migrate_target <br> variable, which must be\none of \"current\" (for the default behavior), > <br> or \"latest\" (for the latest release\nto be deployed with the <br> update_code task). You can also specify additional\nenvironment <br> variables to pass to rake via the migrate_env variable. Finally, <br> > you\ncan specify the full path to the rake executable by setting the <br> rake variable.\n"}, but no servers matched (RuntimeError) <br> </p><p>My deploy file specifies: <br> task :switch_to_production do <br> set :use_sudo, false > <br> set :user, "root" <br> role :web, "<a href="http://mysite.com">mysite.com</a>" <br> role :app, "<a href="http://mysite.com">mysite.com</a>" <br> role :db, "<a href="http://mysite.com"> > mysite.com</a>" <br> set :deploy_to, "/var/www/localhost/rails_test" <br> set :rails_env, "production" <br> end <br> </p><p>task :migrate_production do <br> switch_to_production <br> migrate > <br> end <br> </p><p>I have similar task :whatever_production ones that work (as I''d <br> mentioned). Any ideas? <br> </p>Thanks in advance for any advice.Try: role :db, "mysite.com", :primary=>true Jamey --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
woodsman-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Sep-14 13:12 UTC
Re: capistrano errors when running `cap migrate`
Hmmm, I had encountered that in other code and assumed it only necessary when multiple databases were involved. In any event, it worked and I am deeply appreciative. Best regards! Jamey wrote:> > Try: > > role :db, "mysite.com", :primary=>true > > > Jamey--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---