How to reset Heroku Rails4 asset pipeline cache

前端 未结 4 1905
猫巷女王i
猫巷女王i 2020-12-09 00:08

According to Heroku documentation:

Heroku now caches 50mb worth of tmp/cache/assets which is a cache directory for the asset pipeline to store inte

相关标签:
4条回答
  • 2020-12-09 00:48

    For cleaning assets, run:

    rake assets:clobber

    0 讨论(0)
  • 2020-12-09 00:48

    I had this problem, then i realized I forgot to configure to serve static assets on the production env, inside config/enviroments/production.rb

    config. serve_static_files = true
    
    0 讨论(0)
  • 2020-12-09 00:53

    Hopefully this helps. To get changes to Heroku in development I run rake assets:clean and then rake assets:precompile RAILS_ENV=production --trace before committing and pushing to Heroku

    0 讨论(0)
  • 2020-12-09 00:57

    To purge Heroku's asset cache, you need the Heroku Repo plugin to the Heroku toolbelt. Install that, then use the command

    heroku repo:purge_cache
    

    Deploy after purging the cache.

    0 讨论(0)
提交回复
热议问题