Ruby version: 2.1.5 | Rails version: 4.1.1
For some reason, the changes I make to my JavaScript and CSS files are not reflecting on Heroku; it seems like the cached assets are still being used. I've tried removing the assets and precompiling them before pushing to Heroku. Below are the commands I usually use:
To Remove Assets: rake assets:clobber
To Precompile Assets: rake assets:precompile
I even added RAILS_ENV=production
before running these commands to ensure they take effect in the production environment. Despite doing this, my changes were not updating on Heroku. So, as a last resort, I attempted to remove the assets and precompile them directly on Heroku platform with the following commands:
To Remove Assets: heroku run rake assets:clobber
To Precompile Assets:
heroku run rake assets:precompile
Upon checking the public/assets
folder on Heroku, I discovered an overwhelming number of files present:
(List of files in public/assets)
It's evident that there are too many files in that directory than expected, but unfortunately, I haven't been successful in getting rid of them. Even after deleting the entire public/assets
folder and executing a heroku run rake assets:clobber
command, the folder automatically repopulates with all those files.
How can I effectively clear this extensive cache?