Gemfile
and package.json
respectively, then re-running bundle install && yarn install
.package.json
to verify that @rails/actioncable
is installed. If you have trouble with ActionCable, consider verifying that it's installed correctly.actioncable
with @rails/actioncable
in package.json
yarn remove actioncable
yarn add @rails/actioncable
import Actioncable from "actioncable"
with import { createConsumer } from "@rails/actioncable"
createConsumer
function directlycreateConsumer()
on the Actioncable
import: Actioncable.createConsumer()
createConsumer()
directlyyarn add @cable_ready/polyfills
and include them before your Stimulus controllers (if any) and CableReady channels: