RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: 3dd13
sounds like you are handling 2 different use cases:
* data publishing and subscription
* keep-alive ping-pong
I suggest do not use private_pub to keep track if user is opening the website in the browser. instead, go deep into faye and use the ping feature.
have a look at:
I just spent some time and made it. not sure if you have already figured it out or not.
After you deployed your Ruby web app (Rails, Sinatra, ...) to heroku, you should setup another heroku apps for Faye. Either you use the same Ruby web app source code or use Faye-Heroku-Cedar.
to start the Faye correctly on heroku, the key point is about the Procfile.
what Procfil does in this case is just running the "rakeup -R private_pub.ru" command to start the service.
checkout Faye-Heroku-Cedar and heroku document about Procfile
just a supplement to Steven. I had problem with that as well.
which is after the <%= subscribe_to .... %> is being called.