websocket-rails

Websocket-Rails gem running as standalone timesout trying to connect to Thin on live server

随声附和 提交于 2020-01-17 14:52:28
问题 I'm setting up this app that contains a chat module and everything is working fine on localhost. Now I am trying to connect to the server as a standalone service, but the connection state in the dispatcher is always 'connecting' until it finally times out with the following message: WebSocket connection to 'ws://myserver:3001/websocket' failed: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT Gemfile gem 'faye-websocket', '0.10.0' gem 'websocket-rails', github: 'moaa/websocket

Websockets with Rails(Puma) - Error during WebSocket handshake: Unexpected response code: 200

岁酱吖の 提交于 2019-12-12 03:38:57
问题 I am trying to use websocket in my Rails4.1 application Here are some relevant code snippets: Gemfile: gem 'websocket-rails' gem 'puma' development.rb config.middleware.delete Rack::Lock I am starting the server locally as: bundle exec puma -p 3000 In the chrome console I see a connection error: new WebSocketRails('localhost:3000/post/hello', true); WebSocket connection to 'ws://localhost:3000/post/hello' failed: Error during WebSocket handshake: Unexpected response code: 200 Can anyone help

websocket-rails: Server emits http:// protocol; client expects ws:// protocol

我怕爱的太早我们不能终老 提交于 2019-12-12 03:15:33
问题 From Using the JavaScript Client: Notice the lack of a protocol prefix on the server URL. Do not add http:// or ws:// to the URL that you pass to the new dispatcher. WebSocketRails will choose the best available transport for you and prepend the correct prefix automatically. I'm using WebSocketRails for the first time. I'm getting this error in the client: WebSocket connection to 'ws://localhost:3000/websocket' failed: Connection closed before receiving a handshake response If I navigate my