Rails 3.1.1 asset pipeline Heroku caching gotcha

后端 未结 3 1123
攒了一身酷
攒了一身酷 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:50

    Have you checked out this devise issue on github? Specifically Jose Valim says

    Rails 3.1.1 final has a method called config.assets.initialize_on_precompile. If you set it to false, you should be good but it won't allow you to access model information on your assets (which you probably shouldn't anyway).

    Maybe this will allow the precompile to happen on Heroku for you.

提交回复
热议问题