Rails 3.1.1 asset pipeline Heroku caching gotcha

后端 未结 3 1117
攒了一身酷
攒了一身酷 2021-02-01 10:13

The problem in a nutshell is that in development mode we\'d make changes to CSS or JS files but would always get cached/old versions of these files. Nothing I did had any effect

3条回答
  •  温柔的废话
    2021-02-01 10:36

    The reason the asset precompilation does not work could well be, that the Heroku ENV vars are not present on slug compilation (deploy) as stated here:

    http://devcenter.heroku.com/articles/rails31_heroku_cedar

    There is an (experimental) way to enable the ENV vars during deploy for exactly this reason, find information here:

    http://devcenter.heroku.com/articles/labs-user-env-compile

    Hope this helps.

提交回复
热议问题