Why does Rake task enhancement differ between my local environment and when deploying to Heroku Cedar?
- by John Bachir
I have this in lib/tasks/foo.rake:
Rake::Task["assets:precompile"].enhance do
print ">>>>>>>> hello from precompile"
end
Rake::Task["assets:precompile:nondigest"].enhance do
print ">>>>>>>> hello from precompile:nondigest"
end
When I run rake assets:precompile locally, both messages are printed.
When I push to heroku, only the nondigest message is printed. However, according to the buildpack, the push is executing the exact same command as I am locally.
Why does the enhancement to the base assets:precompile case not work on heroku but does work locally?