Why does Rake task enhancement differ between my local environment and when deploying to Heroku Cedar?

Posted by John Bachir on Stack Overflow See other posts from Stack Overflow or by John Bachir
Published on 2012-04-01T17:12:50Z Indexed on 2012/04/09 11:29 UTC
Read the original article Hit count: 265

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?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about ruby