Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 965
overallduka Avatar asked Jan 22 '26 20:01

overallduka


1 Answers

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

Ex:

config.assets.version = '1.2' # change to '1.3'
like image 105
AJcodez Avatar answered Jan 24 '26 14:01

AJcodez



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!