Tag: 薄型

如何让ActionController :: Live流与Thin一起使用?

题 你可以使用ActionController::Live thin实现服务器端事件(SSE)和长轮询吗? 如果是这样,怎么样? 上下文 虽然标题是如何获取Rails 4 ActionController :: Live流与Thin和Ruby 2一起使用的重复? Thin和Puma如何通过直播流扩展? OP通过提出两个问题来混淆水域,这个问题从来没有得到解答。 许多其他post建议你可以使用thin服务器端事件(sse),如果你通过exec thin start –threaded启动它exec thin start –threaded : Heroku是否支持ActionController :: Live? 和puma只有multithreading导轨4 http服务器? ,Aaron的开创性的http://tenderlovemaking.com/2012/07/30/is-it-live.html和Ryan的常年可靠的http://railscasts.com/episodes/401-actioncontroller-live?view=asciicast 。 但即使我正在复制Railscast示例,我还是无法让它与thin一起工作。 我试过的 # —————————————————————- # file: config/routes.rb Rails.application.routes.draw do resources :widgets do collection do get ‘events’ # SSE test end end end _ # —————————————————————- # file: […]