Rails to Heroku: Static Assets

This little situation would have caused me some grief, had it not been for some advice I got when it occurred.

When you create a new Rails app and you’ve made changes to your static assets (CSS files for example) there’s a config file that needs to be updated with your static asset changes. Without this change, it will work locally with your static asset changes – but a deployment to Heroku or some other host will only show your old assets. At first I thought this was a cache issue… until I was told about this:

You need to go to your app’s file:

and edit this line from false to true:
# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = true

Now redeploy and you’re static assets will compile and be available in your production environment.

Rails to Heroku: Static Assets
User Rating: 0 (0 votes)