为什么这个 rake 任务
gems = %w(gem1 gem2 gem3)
namespace :gems do
namespace :install do
desc "Runs install:migrations for all gems"
task :migrations do
gems.each do |gem_name|
print "\nInstalling migrations for the #{gem_name} gem...\n"
Rake::Task["#{gem_name}:install:migrations"].invoke
end
print "\n\nGem migrations installed."
end
end
end
仅实际运行第一组迁移,无论我使用的 gems/gem ordering/random 调用 reenable 吗?
Installing migrations for the gem1 gem...
Copied migration whatever from gem1
Copied migration whatever from gem1
Copied migration whatever from gem1
Copied migration whatever from gem1
Installing migrations for the gem2 gem...
(nothing)
Installing migrations for the gem3 gem...
(nothing)
Gem migrations installed.