0

我正在使用 rails 4 Live Streaming Future(用于 SSE)。我必须在 development.rb 中设置它(如果我设置为假,页面会挂出):

config.cache_classes = true

config.assets.debug = true
#config.serve_static_assets = true
#config.eager_load = true
config.action_controller.perform_caching = false #(!!!)

但!每当我编辑 js 文件时,我都必须重新加载服务器才能在浏览器中对其进行测试。真的很难!我在哪里可以禁用js缓存?

将不胜感激任何想法!

4

3 回答 3

0

取消注释资产调试模式。

config.assets.debug = true
于 2013-07-28T19:13:23.897 回答
0

好的。我从https://github.com/milchschaum/rails_4_live_streaming复制配置

他曾经

config.assets.debug = true
# Handle multiple requests
config.preload_frameworks = true
config.allow_concurrency = true

完整代码在这里https://raw.github.com/milchschaum/rails_4_live_streaming/c6318701f73bef5125cb4000bd424bdb853e893e/config/environments/development.rb

于 2013-08-06T21:39:56.367 回答
0

在您的config/development.rb中,添加:

config.allow_concurrency = true
于 2014-04-01T22:57:57.373 回答