This device is not compatible.


Build a Chat Room Application Using ActionCable in Ruby on Rails

Learn to build a chatroom application using ActionCable, which is a WebSocket framework for Ruby on Rails that allows real-time communication between the server and the clients.

Build a Chat Room Application Using ActionCable in Ruby on Rails

You will learn to:

Create applications with Ruby on Rails.

Understand the fundamentals of the MVC pattern.

Use ActionCable to build a real-time chat application.

Configure channels, subscriptions, and Active Jobs.


Web Frameworks

Web Development

Socket Programming





Ruby on Rails

Project Description

In this project, we’ll build a real-time chat app in Ruby on Rails using ActionCable. ActionCable is a real-time WebSocket framework built into Ruby on Rails. It allows for bi-directional communication between the server and client in real time, making it ideal for applications that require live updates, such as chat applications, online games, and streaming services.

The application will allow users to create rooms and chat with different users in real time. We’ll also build multiple other features, including channels for organizing WebSocket functionality, automatic subscription management, and message broadcasting to multiple clients.

We’ll use Bootstrap for styling the front end and play around with multiple MVCModel-View-Controller components to configure our application. We’ll also use the Redis server to manage user sessions in the application and allow clients to publish messages to the channels.

Project Tasks


Get Started

Task 0: Initial Setup

Task 1: Create Necessary Components


Create the Main Page

Task 2: Generate New Users

Task 3: Update the Room and Message Components

Task 4: Update the Forms

Task 5: Update the Index View

Task 6: Update the Chat Box Section


Add ActionCable in the Application

Task 7: Create a RoomChannel

Task 8: Update the Subscription for a Specific Room

Task 9: Add a Send Message Job

Task 10: Append New Messages

Task 11: Add Different Views for Sender and Receiver