So we have a small problem with asset pipeline digests in that we have a number of HTML templates as assets (for AngularJS) and we references the paths for these assets in a
A solution was suggested here which involves using the depend_on
or depend_on_asset
directive. In my case adding this to the .js.erb
file works:
//= depend_on_asset views/template.html
url = '<%= asset_path('views/template.html') %>'
This will recompile this file any time there is a change to views/template.html
as desired.
Have you tried running rake assets:clean
then rake assets:precompile
to recompile?
UPDATE Not sure if this is the same issue you are facing but it does sound similar. Take a look at this Heroku issue on github.
If it is the same (or similar), Schneems mentions it takes 3 changes to an asset file for sprockets to clear out the files.
The recommended steps is to run the following 4 times and compare output:
echo "body {background-color: red}">> app/assets/stylesheets/application.css
git add .; git commit -m "assets changed 1"
git push heroku master
heroku run ls public/assets | awk /application/
It's probably best you modify the above to suit your situation.