これを解決しましたか?
同様の問題が発生しています。
プラグインに lib/tasks/test.rake のような Rake タスクを作成した場合、
内容が次のようになっている場合:
desc "count posts"
task "test_rake:test" => :environment do
puts "Number of posts on this forum is #{Post.count}"
end
そして rake test_rake:test を実行した場合:
驚くべき出力が得られます。
Number of posts on this forum is 366
Number of posts on this forum is 366
Number of posts on this forum is 366
きっと何らかの間違いをしているのでしょうが、何が原因かわかりません。
なぜこれが複数回実行されるのか、そしてそれを止めるにはどうすればよいですか?
本番環境でも同様の問題が発生しており、もちろん、より深刻な懸念事項です。