anycable / anycable-rails

AnyCable for Ruby on Rails applications
https://anycable.io
MIT License
499 stars 35 forks source link

Working locally but does not work on heroku env #114

Closed thiagocifani closed 4 years ago

thiagocifani commented 4 years ago

I am trying to run anycable on heroku in the same environment that I have my rails app. I don't know what is happening but it seems I can't access the anycable-go server from outside. Locally I have a node app consuming the websocket. It works fine, but when I try to connect the same app from my machine with the heroku server it does not work. Could you help me with that? I have the action cable mounted on my routes.rb

Tell us about your environment

Ruby version: 2.6.5 Rails version: 5.1.6 anycable gem version: 0.6.0 anycable-rails gem version: 0.6.5 grpc gem version: 1.27.0

What did you do?

Trying to deploy to heroku in the same environment I have my app

What did you expect to happen?

What actually happened?

Can connect from a external (local) service (node)

My PROCFILE

` web: bundle exec puma -C config/puma.rb

rpc: RAILS_ENV=production bundle exec anycable

go: anycable-go --host=localhost --port=3334 `

thiagocifani commented 4 years ago

I have found the answer here

https://docs.anycable.io/#/deployment/heroku

I need to have 2 diff env cause of http/2 .