ruby-on-rails - 如何重置 Heroku Rails4 Assets 管道缓存

标签 ruby-on-rails caching heroku ruby-on-rails-4

根据 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 consoleRails.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/

相关文章:

ruby-on-rails - Rails 应用逻辑国际化

Android 退出时清除外部图像缓存

java - JPA2 缓存或 hibernate 缓存

mysql - 我可以使用 ActiveRecord 根据最近匹配(levenshtein 距离)查找行吗

ruby-on-rails - React.js 和 Rails 模型之间的通信

javascript - 取出图片标签 alt :missing. "image tag without an alt id is prefered and not showing missing"

java - JCache 的 Spymemcached 的完全限定名称

postgresql - 英雄联盟 "psql: FATAL: remaining connection slots are reserved for non-replication superuser connections"

php - 是否可以将 Heroku Foreman 与 PHP 一起使用?

php - CodeIgniter 3 无法找到您指定的模型