Kyle Jobbins

Joined

170 Experience
1 Lesson Completed
0 Questions Solved

Activity

Posted in Testing Rails ActionCable Channel

I followed along with the Online user tracking with ActionCable and was able to get it all working. I replicated a similar channel in another app and again it works great, however when I came to test the channel I hit a problem.

The problem:
Inside the the 'subscribed' method of the channel I am using the same 'ActionCable.serve.pubsub.redis_connection_for_subscriptions ...' as in the Online user tracking, this works fine in development, but when it comes to testing I get the following error;

NoMethodError: undefined methodredis_connection_for_subcsriptions' for #ActionCable::SubscriptionAdapter::Test:0x00007fbd5969d3e0`

I have dug around to try and figure out what is causing this and why but have not had any luck so far. Has anyone seen this error when working with/testing action cable channels, and how did you fix it ?

Thanks in advance

Posted in Realtime Online User Tracking with ActionCable Discussion

After digging around a little I noticed the problem was in cabl.yml, (Im assuming you both encountered this issue while working in development).
There is an 'adapter: async' under the development namespace, just set it to redis and that solved my problem.

Posted in Realtime Online User Tracking with ActionCable Discussion

I got the same error. Were you able to figure out the cause or a fix ?