4
爲什麼這rake任務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
只有實際運行第一組遷徙,無論是寶石/寶石順序/隨機調用重新啓用我用?
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.
確定,但是,關於問題,需要重新啓用 「railties:安裝:遷移」 每個瑞克::任務[ 「#{}創業板:安裝:遷移」。執行或調用,一切都很好。 –