A collection of examples showcasing the capabilities of Action Cable.
You must have redis installed and running on the default port:6379 (or configure it in config/redis/cable.yml).
wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable
make
make install
brew install redis
npm install
- Run
./bin/setup
- Run
./bin/cable
- Open up a separate terminal and run:
./bin/rails server
- One more terminal to run redis server:
redis-server
- Visit
http://localhost:3000
- Open two browsers with separate cookie spaces (like a regular session and an incognito session).
- Login as different people in each browser.
- Go to the same message.
- Add comments in either browser and see them appear real-time on the counterpart screen.