3

I'm in the process of developing a Rails app which uses ActionController::Live, and the action in that controller is set to subscribe to Redis Pub/Sub.

It's pretty much the same method described here - http://www.beilabs.com/2013/05/02/redis-pub-sub-and-rails-4-streaming

The problem is, in development, whenever the live action is called, the whole app freezes and stops serving requests. I can't figure out why.

Any help will be greatly appreciated.

  • 1
    Are you using Puma? If so, are you encountering the thread problem I've outlined [here](http://stackoverflow.com/q/18970458/877472)? If so, the temporary solution might be to implement the thread-killer concept. – Paul Richter Nov 08 '13 at 16:43

1 Answers1

3

make sure that you these are set in your config/environments/development.rb

config.cache_classes = true
config.eager_load = true

when playing with live streaming. This will mean that you have to restart your rails server whenever you make a change though.

You'll probably want to look into setting up guard to automatically restart your server on file changes.

Alternatively, look into the existing guard gems like guard-rails, guard-puma, or guard-zeus.