I want to run all the migrations on all my databases. For this, I have a task called run_migrations. Consider this code: desc ''Runs migrations on all databases'' task :run_migrations => :environment do [ ''development'', ''test'', ''production'' ].each do |environment| ENV[''RAILS_ENV''] = environment Rake::Task[''db:migrate''].execute('''') system "RAILS_ENV=#{environment} rake db:migrate" end end This runs migrations only for the development database because further calls to execute the task are ignored. Is there any way to force the execution of the Rake task? Regards, Mohsin --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---