Since I have spent about 15 minutes today trying to figure out why my WebSockets are not updating in development, I have decided to put quick fix here, hopefully this will be useful.
When I started ActionCable I got this error:
Request origin not allowed: http://0.0.0.0:3000
Failed to upgrade to WebSocket (REQUEST_METHOD: GET, HTTP_CONNECTION: Upgrade, HTTP_UPGRADE: websocket)
Finished "/cable/" [WebSocket] for 127.0.0.1 at 2016-08-01 14:23:38 -0700
- Go to
- Add following line:
Ruby1config.action_cable.allowed_request_origins = ['http://0.0.0.0:3000']
- Restart Web Server
Click Subscribe to stay tuned for some cool Rails 5 ActionCable examples!