overallduka overallduka - 6 months ago 20
Ruby Question

Heroku doesn't update assets modifications

I'm using heroku to deploy my app in ruby on rails, but have a problem, when I deploy my app, heroku doesn't update with the modifications I made, before I compiled my assets. I solved my problem in localhost using a simple

rake assets:clean
but in heroku this doesn't solve what I make to back update when I modify my assets

config.assets.initialize_on_precompile = false

config.assets.initialize_on_precompile = true

Changed this but it doesn't work


There's a few things to do. The first is to redeploy

$ rake assets:clean
$ rake assets:precompile
$ git add .
... deploy to heroku

If it still doesnt work, it could be a caching issue, in which case, you can manually bump the version in config/application.rb and redeploy to expire all the previous assets


config.assets.version = '1.2' # change to '1.3'