Join GitHub today
Faye.ensure_reactor_running! in an initializer #26
Hi, I noticed your recent change to the README in which you recommended an initializer to run
Have you gotten ensure_reactor_running! working in one of your own apps?
Okay. Here's the horrible way I solved this in MessageRocket:
# config/initializers/faye.rb def running_as_server? Rails.const_defined?(:Server) || defined?(::Rack::Handler::Thin) end Rails.application.config.after_initialize do unless running_as_server? Faye.ensure_reactor_running! end end