Ruby on Rails push notifications

2019-04-01 23:41发布

问题:

Is there any gem, anything I can use to push notifications from server to the web application in a Rails App?

This means not having to call an ajax request from time to time.

:: UPDATE :: Forgot to mention one important requirement which is that I'm using Rails 3.2

回答1:

You can easily do this with Faye gem in rails. There is a great railscast on this. Faye



回答2:

You can use websockets for ruby to establish the client-server communication. For example use the websocket gem for it.

Also, you can read this topic.