My rails (5.0.0beta4) (and actioncable) work well in place.
But on heroku, the browser does not seem to receive any data from the actioncable stream.
Here is my heroku installation:
I am using redis-to-go addon
production: &production
adapter: redis
url: redis://redistogo:[password]@hoki.redistogo.com:9079/
host: hoki.redistogo.com
port: 9079
password: [password]
inline: true
timeout: 10
AT config/environments/production.rb
config.action_cable.url = "https://duewiz.herokuapp.com/cable"
config.action_cable.allowed_request_origins = ["https://duewiz.herokuapp.com",/http:\/\/duewiz.herokuapp.com.*/]
Here I tried the wss and https protocol but it doesn't work.
AT routes.rb
mount ActionCable.server => '/cable'
And in app/assets/javascripts/channels/cable.coffee.erb
@App ||= {}
App.cable = ActionCable.createConsumer()
I run redis-cli monitorredis-to-go on the server, it outputs data from my ActionCable.broadcastcalls
In heroku magazines I can see the broadcasts ActionCable
But I do not see the changes in my browser, but everything works fine.
I performed heroku restartfor each deployment
I also recall one that I use devise / warden for auth (also for actioncable)
module ApplicationCable
class Connection < ActionCable::Connection::Base
identified_by :current_user
def connect
self.current_user = find_verified_user
logger.add_tags 'ActionCable', current_user.email
end
protected
def find_verified_user
if verified_user = User.find_by(id: cookies.signed['user.id'])
verified_user
else
reject_unauthorized_connection
end
end
end
end
So, how do I configure actioncable for deployment on heroku?
Thanks for the help.
Thanks pdoherty926. There is no javascript error in my browser console.