Javascript is cached in development mode with asset pipeline

后端 未结 8 989
感动是毒
感动是毒 2021-02-07 07:53

I recently upgraded my application to rails 3.1 and generally everything seems to be working but one thing is driving me insane.

I have 2 main js files, we\'ll call the

8条回答
  •  灰色年华
    2021-02-07 08:39

    Also note that if you enable config.threadsafe, it will turn cache_classes on. So if your config/environments/development.rb file contains the following:

    config.cache_classes = false
    config.threadsafe!
    

    Then you are turning off cache_classes and then turning it right back on. You will need to either comment out config.threadsafe (if you don't need it) like this:

    config.cache_classes = false
    # config.threadsafe!
    

    Or, if you need threadsafe, reverse the order of these two configurations so that config_classes is really turned off:

    config.threadsafe!
    config.cache_classes = false
    

    For more information, see http://tenderlovemaking.com/2012/06/18/removing-config-threadsafe.html

提交回复
热议问题