How can I run SOME initializers when doing a Rails assets:precompile?

前端 未结 5 1833
無奈伤痛
無奈伤痛 2021-02-04 03:55

Background

I have an app that I recently updated to Rails 3.2.1 (from Rails 3.0.x) and have refactored the JS and CSS assets to make use of the new asset pipeline. Th

5条回答
  •  孤城傲影
    2021-02-04 04:04

    For Heroku I am running the Asset Sync gem to store my files on a CDN to avoid hitting Heroku for static images. It works nicely. I also have initialize on precompile false, but the Asset Sync runs it's own initializer so you could put your code in that. https://github.com/rumblelabs/asset_sync

提交回复
热议问题