Rails 4 asset pipeline doesn't overwrite assets with asset_path references to other assets

前端 未结 2 1855
粉色の甜心
粉色の甜心 2021-01-03 00:52

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

2条回答
  •  南方客
    南方客 (楼主)
    2021-01-03 01:35

    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.

提交回复
热议问题