Action Cable seamlessly integrates WebSockets with the rest of your Rails application.
It allows for real-time features to be written in Ruby in the same style and form as the rest of your Rails application, while still being performant and scalable.
It's a full-stack offering that provides both a client-side JavaScript framework and a server-side Ruby framework.
You have access to your entire domain model written with Active Record or your ORM of choice.
You must have redis installed and running on the default port:6379 (or configure it in config/redis/cable.yml).
1 wget http://download.redis.io/redis-stable.tar.gz
2 tar xvzf redis-stable.tar.gz
3 cd redis-stable
4 make
5 make install
brew install redis
- 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