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 destroy chatrooms for current_user with ActionCable?

I created a chatroom feature with Rails 5.1, the issue that I am having, is that I'm unable to destroy the chatrooms created by the current_user. How can I fix my code to destroy the chatroom and the users within the thread by the owner of the…
Johnny C
  • 121
  • 1
  • 1
  • 11
0
votes
0 answers

Action cable + Sidekiq + Roo - Displaying csv rows count

I have a model called Scanner the purpose of this is upload a xlsx file through active storage and then process the file in the background with sidekiq and roo gem to create a new txt file. That process it's working perfectly. The part where I am…
0
votes
1 answer

Add user to actioncable channel without page refresh.

When I'm referring to actioncable channels, i am referring to this: . After creating the chatroom + chatroom_users, the user has to refresh the page to connect to that specific chatroom_id channel. Is it possible to connect to that channel without…
Raidspec
  • 71
  • 7
0
votes
1 answer

Action Cable conversation.between isn't functioning properly

So, I have a web app that allows two users to message each other. A "recipient" and a "sender". When two users first try to message each other, it works great. But if a user tries to message a different person, Action Cable doesn't create a new…
Colin Steidtmann
  • 417
  • 1
  • 4
  • 10
0
votes
0 answers

Actioncable with infinite channel streams

Basically I am trying to add live chatrooms to my Rails website. In my app there are 2 models: Client and Professionnel. Clients can ask quotes to professionels. (Edit: Quote is a model too) For each quote I want to have a live chat available…
Maxence
  • 2,029
  • 4
  • 18
  • 37
0
votes
2 answers

Action cable : Call custom method in channel

I'm trying to implement action cable. This is working well, but I want, when I'm connecting to a channel, to receive some data (here I want to know how many users are connected yet). I created on my channel a custom method nbUsers : class…
Xero
  • 3,951
  • 4
  • 41
  • 73
0
votes
1 answer

Rails app not showing notifications through ActionCable

I have a todo-list rails app that allow one user to mark others users public lists as their favorite. The goal here is: when the owner of the list create a new todo-item, the users which mark that same list as their favorite should receive a…
Lucas
  • 55
  • 1
  • 10
0
votes
1 answer

ActionCable slow in production

I am building a basic chat application for customer support of a website. It works flawlessly in development on local server. I pushed the changes to the server but it is behaving extremely slow. The application in itself works fast but the pub/sub…
0
votes
0 answers

WebSockets on Rails 5 with Action Cable: Error during WebSocket handshake(404)

My web server is nginx and using websockets between Rails and AngularJS applications. I tried it with puma and passenger services and both of them not working, But It sometimes works with specific internet connection, I don't know why :( please help…
sjcoder
  • 161
  • 2
  • 8
0
votes
0 answers

NG2 cable in Angular with Rails action cable is not configure(broadcast) on server

I am working on Rails 5 action cable with angular 4 in the frontend. I have got following error in console. WebSocket connection to 'ws://ec2-xxx-yyy-53-1ss.eu-west-2.compute.amazonaws.com/cable' failed: Error during WebSocket handshake:…
urjit on rails
  • 1,763
  • 4
  • 19
  • 36
0
votes
1 answer

Is it possible to use ActionCable to receive TCP data?

Good people, I am looking to write a rails 5 app that will receive a TCP data stream from an external party. Is it possible to receive TCP data using ActionCable? Are there sample apps online? Google hasn't been helpful Or will I need to use…
anthonyms
  • 950
  • 1
  • 10
  • 20
0
votes
0 answers

Implement undelivered messages with anycable Gem and server anycablego

I want to implement something like whatsapp message, when you are not connected and you are connected again your message is arrived. but for that I implement after_subscribe the callback method forwading_queues than is executed after subscription…
Darlyn
  • 310
  • 1
  • 2
  • 16
0
votes
1 answer

error on Real time messages with Action Cable ruby on rails

I'm building text message system that will save to sqlite, the error im getting is from the code. on creating new message I get this error ActiveRecord::StatementInvalid (SQLite3::BusyException: database is locked: INSERT INTO "notifications"…
Amer Bearat
  • 876
  • 2
  • 7
  • 25
0
votes
1 answer

How can I test ActionCable using RSpec?

This is my NotificationChannel class NotificationChannel < ApplicationCable::Channel def subscribed stream_from "notification_user_#{user.id}" end def unsubscribed stop_all_streams end end How can I write test for this ActionCable…
Tanay Sharma
  • 1,098
  • 10
  • 29
0
votes
0 answers

Action Cable onReceive not called when message is broadcasted as soon as channel is subscribed

Following is what my code looks like: class ADDActionCableHelper { static let actionCable = ADDActionCableHelper() private var client: ActionCableClient? var didReceiveJSON: ADDJSONHandler? var wrChannel: Channel? private init() { …
Mansi
  • 628
  • 1
  • 8
  • 18