I implemented the chat functionality in my RoR app based on the 'private pub' gem and Faye. I launched it on heroku and it works on laptop browsers, however, not on iphone/ipad Safari (messages don't auto refresh).
I found a similar question but was not clear about the answer/if there was a solution. Does Faye work on the iPad
How can iOS Safari connect to the faye server/ pub channel? I have followed the settings as per the tutorial (http://www.thegreatcodeadventure.com/hello-or-building-a-chatting-app-with-rails/):
MyApp/config/private_pub.yml:
production:
server: "http://myapp.herokuapp.com/faye"
...
Heroku-deploy-faye-app/config/private_pub.yml:
production:
server: "http://myapp.herokuapp.com/faye"
...
Heroku-deploy-faye-app/private_pub.ru:
# Run with: rackup private_pub.ru -s thin -E production
require "bundler/setup"
require "yaml"
require "faye"
require "private_pub"
Faye::WebSocket.load_adapter('thin')
PrivatePub.load_config(File.expand_path("../config/private_pub.yml", __FILE__), ENV["RAILS_ENV"] || "production")
run PrivatePub.faye_app
I'm hoping for a quick fix based on the config settings. Or do I need to switch to a different solution (e.g. socket.io, Twilio, Pusher...)? Thanks a lot!