1

I tried to deploy on production server Rails with actioncable (5.1.5) according to this tutorial https://www.phusionpassenger.com/library/config/nginx/action_cable_integration , on the same host and port, under a sub-URI

But i've got 404 on my /cable url, no errors in production.log

Have tried in application.rb

config.action_cable.mount_path = '/cable'
config.action_cable.allowed_request_origins = ['mydomen.com']

no success.

Anyone have experience with this versions of passenger/rails?

Ubuntu 16.04.3 LTS
nginx version: nginx/1.12.2
Phusion Passenger 5.1.12
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-linux]
Aaron Christiansen
  • 11,584
  • 5
  • 52
  • 78
kolas
  • 754
  • 5
  • 16
  • Have you changed routes.rb file to incude the route? – GorillaApe Mar 08 '18 at 08:18
  • @GorillaApe i changed, yes, ```mount ActionCable.server => '/cable'``` Also tried to deploy to standalone server. Actually action cable works on `/cable` path, but only without nginx passenger `location /cable` config. I presume it works with limited connection number. Maybe i am missing something. Can't figure it out – kolas Mar 08 '18 at 10:09
  • I cannot guess what is happening since I need full config. However the only error i see is that you have config.action_cable.mount_path = '/websocket' and you use /cable. – GorillaApe Mar 08 '18 at 11:03

1 Answers1

1

I have found the answer.

I have the nginx config generated by cloud66.com. They forgot to put passenger_enabled on; to ssl server section, adding this resolved the problem.

kolas
  • 754
  • 5
  • 16