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

NoMethodError (undefined method `fetch' for nil:NilClass)

Issue is with broadcasting data through a web socket using ActionCable. The error seems to suggest its coming from the create method. Error Message Rendered weight/_weight.html.erb (1.1ms) [ActionCable] Broadcasting to weight: "
will
  • 49
  • 11
0
votes
1 answer

ActionCable not working with nginx on cloud server

I am using rails 5 for actioncable. I have developed and tested application with actioncable on my local machine (in development environment). But when I try to deploy the code to cloud server(i.e. digitalocean). Actioncable suddenly stops working.…
dArK kNiGhT
  • 151
  • 2
  • 12
0
votes
0 answers

action cable chat crashing/freezing in ios, it works fine on android and web

i am currently developing a app and this app is using action cable for its chat function. when i try to send a message in ios it freezes 9/10 times this never happens on android or the web version. i have searched for a solution for my…
Wesley
  • 1
0
votes
1 answer

Concatenation of single quotes to front and back of a String in Coffeescript without turning it literal

I'm having trouble with creating multiple buttons and matching event listeners in the CoffeeScript part of my ActionCable channel. I'm aware of the different concatenation methods for single quoted text (Literal Strings) and double quoted text…
0
votes
1 answer

React with Rails REST api - actioncable

I have a react frontend(not using the react-rails gem) and i want to use Rails api for realtime interaction. I have this post.coffee code in my rails already working for ActionCable: App.post = App.cable.subscriptions.create…
Welp
  • 357
  • 1
  • 5
  • 17
0
votes
1 answer

Action Cable (Rails 5) Pulling data from Stock Exchange

I am hoping to stream data that I receive from a stock exchange (via a websocket) and broadcast that data to the client. I believe action cable is the best approach, but have been unsuccessful thus far. The "DataProvider" built an SDK on Ruby to…
0
votes
1 answer

Broadcast message to client after specific time in action cable

I have used action cable in Rails 5. I want to broadcast message to server after wait of n seconds. I made R&D for same but not find anything useful. can someone please advise me on how to broadcast message to client after waiting n period of time?
darshi kothari
  • 642
  • 1
  • 5
  • 12
0
votes
0 answers

Making current_user available in ActionCable channels using bcrypt

I'm trying to make current_user available in my channel actions.. This is the first time I'm diving into ActionCable and the tutorial I'm following is using Devise and I am not.. In channels/application_cable/connection.rb. They have module…
gemart
  • 346
  • 1
  • 3
  • 18
0
votes
1 answer

Rails render command responding api wrongly

I have an API method that's implemented just like this: def change_status_operacao if @user.change_status_operacao(params[:status], params[:empilhadeira_id].to_i, params[:motivo_id].to_i) emp =…
Ronan Lopes
  • 3,320
  • 4
  • 25
  • 51
0
votes
1 answer

Rails ActionCable and Ember CLI app - Resource Bottlenecks

We've successfully implemented real time updates in our app using ActionCable in Rails and implemented the consumer as a client service in Ember CLI, but am looking for a better, less-expensive approach. app/models/myobj.rb has_many :child_objs def…
Michael
  • 1,786
  • 5
  • 23
  • 42
0
votes
1 answer

ActionCable.server => ' /cable' within authenticated_rooth_path only

Consider the following scenario: 1) WebSocket authenticates the connection. def connect self.current_user = find_verified_user logger.add_tags "ActionCable", "User #{current_user.id}" end 2) When connection is established, inform the user …
Crashtor
  • 1,249
  • 1
  • 13
  • 21
0
votes
1 answer

ActionCable Multiple Channels

I am new to ActionCable and I was wondering how to set up multiple room channels for a chat. I was looking it up and still cant figure it out. I want to make each user have their own room channel is there a way to do this? Thank you for the help.
jrocc
  • 1,274
  • 2
  • 18
  • 48
0
votes
1 answer

ActionCable: Why so many connections?

Since trying out ActionCable in a a local, dev environment. I have noticed the application slowing down and frequently hanging. If I run netstat I see many connections, created by action cable. Is this expected and normal? netstat -atn | grep…
port5432
  • 5,889
  • 10
  • 60
  • 97
0
votes
0 answers

Rails ActionCable didn't receiving data

I have two servers APIs server(Rails & ActionCable) Customer server(Rails 5.1 & Vue js & actioncable from Yarn) on APIs server: in app/channels/operation_channel.rb class OperationChannel < ApplicationCable::Channel def subscribed …
Donald Chiang
  • 167
  • 1
  • 1
  • 14
0
votes
1 answer

Rails actioncable transmits wrong styling

I build a chat using ActionCable. I want the messages to have a different styling wether I or any other User has written them. Mainly my own messages should be displayes on the right side and the messages from other users should be displayed…
Max
  • 275
  • 1
  • 4
  • 21