ActionCable issues on app upgraded to Rails 5

759 views Asked by At

ActionCable is not working on my app that I just upgraded to Rails 5.0.1. I generated a channel with rails g channel.

When I run the server I don't see any line in the log that indicates ActionCable is doing anything. On the client side I get App is not defined

I created a new app with rails new and ActionCable works fine in it. I compared all the relevant files in and they look the same in both apps.

Are there some gems that I need to install in my upgraded app that would be installed by default in a new Rails 5 app? I checked and I have actioncable.

1

There are 1 answers

1
Life4ants On BEST ANSWER

My problem was that cable.js was not included in application.js because I have my javascript files included explicitly by name and forgot to add cable.

Don't know if this Q&A will help anyone else, but if it does....