Questions tagged [actioncable]

Action Cable is an open source technology shipped to us with Ruby On Rails 5. It uses websockets instead of traditional HTTP protocol and allows 2-way asynchronious data transfer. The best field of application for ActionCable is chat, single page applications and so on.

The Action Cable source is placed at Github.

To find code examples please check actioncable-examples repository.

849 questions
0
votes
1 answer

How to detect events for button appended with ActionCable?

I have created an ActionCable channel using rails generate channel conversation speak, then added something like the below code at the end of conversation.coffe: $ -> $("button").click (event) -> alert() App.conversation.speak("main",…
Vantalk
  • 367
  • 2
  • 5
  • 21
0
votes
1 answer

Using ActionCable along with geolocation services

I've got a fairly simple chat service up using Rails 5 and ActionCable. It allows the user to select 1 of a handful of rooms and it all works great and was super fun to setup. The next issue I want to tackle is using geolocation to only display…
Steve E
  • 792
  • 10
  • 16
0
votes
1 answer

Rails 5.0.0 Actioncable via Proxy

I have an chat application deployed to a vps with Puma and Nginx 1.10 my nginx config is the following: upstream websocket { server 127.0.0.1:28080; } server { location /cable { proxy_pass http://websocket/; proxy_http_version 1.1; …
Abolfazl Mahmoodi
  • 380
  • 1
  • 3
  • 20
0
votes
1 answer

ActionCable vs Socket.Io is the most reliable and most scalable?

Which one is the most reliable and the most scalable? ActionCable or Socket.io? In order to avoid the opinion based answers please provide some real measured data which prove the hypothesis. Are there any apps out there in production which were…
Boti
  • 3,275
  • 1
  • 29
  • 54
0
votes
1 answer

How To Authenticate With Keys In ActionCable

I was able to authenticate with cookies in ActionCable using cookies.signed[:user_id] but I can't figure out how to do it using keys. For example, sending an Authorization header when establishing a connection. The only variable that is accessible…
Artem Kalinchuk
  • 6,502
  • 7
  • 43
  • 57
0
votes
2 answers

Getting AuthLogic to work with ActionCable

I'm working on a new Rails 5 (RC1) app. I used AuthLogic for user authentication, and it works great as always, until I got to ActionCable. #app/channels/application_cable/connection.rb module ApplicationCable class Connection <…
Kansha
  • 570
  • 4
  • 12
0
votes
2 answers

ActionCable: Redirecting to path or action from a channel

How can I redirect to a path from a n_channel.rb? I can't use redirect_to or link_to. What is the best way?
Shakil
  • 1,044
  • 11
  • 17
0
votes
1 answer

Deploy ActionCable on Heroku (Rails 5 beta4)

I have a working rails 5 app with ActionCable on my localhost, and I'm trying to deploy it to heroku. When accessing the page where the chat room is, I can see in chrome's console: WebSocket connection to 'wss://full-beyond-9816.herokuapp.com/cable'…
Graham Slick
  • 6,692
  • 9
  • 51
  • 87
0
votes
1 answer

Invalid Redis password while deploying Rails5 beta3 app with ActionCable on Heroku

First of all, my application just works fine in development. I've been following tutorials to deploy an Action Cable app on Heroku, but I hit this problem: My app's config is that way : config/cable.yml: development: &development :url:…
Poilon
  • 174
  • 1
  • 7
0
votes
0 answers

Rails 5.0.0beta3 Action Cable - Messages only send in browser after I send one via Chrome Console?

It's a really strange glitch. My website just isn't letting me send messages when the page is first loaded, messege sending and reciving is working perfectly though if I create a message through the Chrome browser console via…
0
votes
0 answers

I am getting this error "Uncaught SyntaxError: Failed to construct 'WebSocket': The URL 'undefined' is invalid."

this.webSocket = new WebSocket(this.consumer.url); when i ran my project i received this error on this line in file action_cable.self please ask for any further code if needed.
0
votes
1 answer

ActionCable. Redis reconnect failed

While testing RoR 5.0 beta and actionCable I had this error in console. [ActionCable] Redis reconnect failed.e After that install this Redis by using HomeBrew. But nothing happens. How to fix it? OS X. Rails 5 beta.
Yomud
  • 1
  • 2
0
votes
1 answer

Rails 5 in production with heroku

I use rails 5 with actioncable on heroku and i have this error only in production WebSocket connection to 'wss://adham-chatty.heroku.com/cable' failed: WebSocket opening handshake was canceled i think because of…
Adham El-Deeb
  • 335
  • 3
  • 16
0
votes
1 answer

Heroku: Rails 5 WebSocket connection failed

i'm trying to deploy reactjs on rails 5 app on heroku this is my Procfile web: bundle exec puma -C config/puma.rb this is my puma.rb file workers Integer(ENV['WEB_CONCURRENCY'] || 2) threads_count = Integer(ENV['MAX_THREADS'] || 5) threads…
0
votes
1 answer

Reliably implement presence status with ActionCable

I have implemented a chat feature using ActionCable. I am now trying to implement a presence status based on the implementation of user appearances in the README. This documentation mention the following statement: The #subscribed callback is…
ybart
  • 876
  • 8
  • 23
1 2 3
56
57