September 2022
Intermediate to advanced
410 pages
10h 7m
English
Installing ActionCable has already been done as part of our generic Rails setup. The Ruby gem is a dependency of Rails, so it is part of our Gemfile.lock. We need to add the the JavaScript package to our package.json file, along with the associated TypeScript definitions with yarn add @rails/actioncable @types/rails__actioncable. We’ll have a couple of other bits we need to do when we start generating our own ActionCable channels.
ActionCable has some configuration that you can see in the config/cable.yml file:
| | development: |
| | adapter: redis |
| | url: redis://localhost:6379/1 |
| | |
| | test: |
| | adapter: test |
| | |
| | production: |
| | adapter: redis |
| | url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" ... |
Read now
Unlock full access