websocket-rails: Cannot connect websocket
NickName:NmdMystery Ask DateTime:2016-01-08T10:24:14

websocket-rails: Cannot connect websocket

I must be missing some important information about using websocket-rails, because I can't figure out how to connect to the websocket server. After running websocket_rails:install and following the guide, I get the following:

Firefox can't establish a connection to the server at ws://localhost:3000/websocket.

Originally, checking in chrome it's clear it's a 404 error, meaning the address doesn't exist. The guide doesn't mention having to do any routing, so I have no idea how to fix this.

However, if I don't have any websocket controllers, then it becomes a handshake timeout, and switching to faye-websocket 0.10.0 doesn't fix the problem (as suggested here). I think there might be some kind of caching getting in the way, since any time I changed the websocket controller I would get an uninitialized constant error referencing the old name of the class, which no longer exists.

I've found the file in the library where the routing happens, so I know I don't have to do it myself. What's wrong here?

Copyright Notice:Content Author:「NmdMystery」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/34668499/websocket-rails-cannot-connect-websocket

More about “websocket-rails: Cannot connect websocket” related questions

websocket-rails: Cannot connect websocket

I must be missing some important information about using websocket-rails, because I can't figure out how to connect to the websocket server. After running websocket_rails:install and following the ...

Show Detail

Calling websocket-rails from a ruby client

I have a pure ruby client where I want to send a message over a websocket connection. The websocket runs inside a rails application and I am using the websocket-rails gem ( https://github.com/webso...

Show Detail

websocket-rails Chat Rooms

I am trying to create sort of Whatsapp like messaging app server side in Rails, with private conversations. now, I am trying to implement the realtime part of the app - I am using websocket-rails -...

Show Detail

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

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

Show Detail

Websocket-Rails and IE 8

I'm working on a real-time chat application using the websocket-rails gem and am having difficulty in getting real-time updates to happen in Internet Explorer 8. There's an option at the bottom o...

Show Detail

Send message to websocket-rails by curl

I uses this gem https://github.com/websocket-rails/websocket-rails. And I try create new user in websocket-rails app by curls. For example: curl http://localhost:3000/websocket -d 'message={"chan...

Show Detail

websocket-rails gem and authentication

On the wiki for websocket-rails it has the following example using the CanCan gem. How can this work? With a normal http request a cookie is sent that has a token that identifies the user, but with

Show Detail

Websocket-rails not triggering message to channel (standalone, synchronized)

I'm trying to use websocket-rails (standalone, synchronized w/ redis on local.host:3245) with my Rails Grape API (running on local.host:3001) Now I try to send messages to channel A from one of my...

Show Detail

Websocket-rails and redis-rb do not restore Pub/Sub Channel on failover

I'm using websocket-rails in a synchronized cluster configuration: 2 Rails Instances (FrontEnd) 2 Redis Instances, One Master one Slave (Backend) 4 Sentinel Instances on all Nodes Websocket-rails

Show Detail

Issue with rails, websocket-rails, websocket, redis + websocket-rails

I am using redis, sidekiq gem in one of my project and later added websocket-rails gem. After that I am having issue something like this: /synchrony.rb:114:in `resume': double resume (FiberError) ...

Show Detail