Well, this was fun. The app I’m working on had background message sending that was then taken out for various reasons.
I just couldn’t get it working again and the original dev has gone off to pastures new.
After a lot of head scratching I created a Rails app with nothing in it and then added the Application Cable stuff to see if it would work.
Same problem:
- Browser fires up
- Channel opens
- Sending messages from the console does nothing
Couldn’t see the activity in the dev environment, much rubbing of chin ensued.
Then, dear reader, I decided that the dev config that used an adapter called async
could maybe be replaced with the same as the production one that uses Redis.
- Install Redis
- Create the config files
- Start it up
- Change the
config/cable.yml
file so it uses Redis instead
And it worked! So, whatever that async
adapter is supposed to do it doesn’t do it.
The target system uses Docker and I think Redis is already in the mix, but at least I have something to check now.
Go me.