根据 Heroku documentation :
Heroku now caches 50mb worth of tmp/cache/assets which is a cache directory for the asset pipeline to store intermediate files. This means that future asset compilations will be faster due to not having to recalculate these files.
我的问题是如何手动重置或删除此缓存,以便必须再次预编译我的所有 Assets ?我试过
heroku run console
和 Rails.cache.clear
但它没有用。我想重置缓存的原因是我已经更改了 config.action_controller.asset_host
在我的 production.rb
文件,但由于缓存,Heroku 没有接受更改。
最佳答案
希望这会有所帮助。获取对 的更改Heroku 在开发中我运行 rake assets:clean
然后 rake assets:precompile RAILS_ENV=production --trace
之前 提交 并推送到 Heroku
关于ruby-on-rails - 如何重置 Heroku Rails4 Assets 管道缓存,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22975470/