Why are my CSS/JS changes not showing up in my Rails app?

Issue

Deployed changes to CSS or javascript assets are not showing up after deploying a Rails app.

Resolution

When using the Ruby buildpack, this checks to see whether assets were compiled locally and committed to git for each deploy by looking for a manifest.yml file in the repo. This is shown by the following message in the build log:

Detected manifest file, assuming assets were compiled locally

This usually indicates that rake assets:precompile has been run locally and then those files were committed to git. Heroku interprets this to mean that you'd rather precompile your assets manually, which some users like to do for faster builds. See https://devcenter.heroku.com/articles/rails-asset-pipeline#compiling-assets-locally

To stop this happening you need to remove the manifest.yml from public/assets, commit that change to git and then redeploy. Rails 4 uses a file called public/assets/manifest-<md5 hash>.json instead. More recent versions use public/assets/.sprockets-manifest-<md5 hash>.json (note the dot . indicating it may be hidden by default on your machine).

Once removed, ensure that you've committed the change to git and deploy again.

Ask on Stack Overflow

Engage with a community of passionate experts to get the answers you need

Ask on Stack Overflow

Heroku Support

Create a support ticket and our support experts will get back to you

Contact Heroku Support