A practical Rails 8 guide

Build real-time Rails without turning your app into a JavaScript project.

Realtime Rails connects Turbo, Stimulus, Action Cable, and Solid Cable in one working application. Start with normal Rails requests and move through broadcasts, private streams, presence, optimistic UI, reconnects, and the tests that prove the second browser actually updates.

10 chapters · Rails 8.1 · source code included · Agent Companion coming soon

Realtime Rails book cover
Built around Turbo Stimulus Action Cable Solid Cable Rails 8.1

A broadcast is easy. The boundaries around it aren’t.

Turbo, Stimulus, and Action Cable are straightforward in isolation. The problems show up when one feature crosses all three.

Switchboard: one app, ten chapters

Switchboard is a small team chat application built to expose the problems that simple real-time demos skip. Messages need to reach other sessions, private streams need real scoping, reconnects need sane behavior, and the tests need to prove it all works.

  • Live room messages with Turbo Stream broadcasts
  • Private direct messages with correctly scoped streams
  • Typing indicators and presence over Action Cable
  • Optimistic UI that reconciles with server-rendered state
  • Reconnect handling, unread state, and read receipts
  • Multi-session system tests that prove the real-time behavior

A Turbo Stream can update the page. A broadcast can reach every subscriber. A Stimulus controller can own browser behavior. A custom Action Cable channel can move arbitrary data. The decision is where to draw the line.

The book keeps all of those decisions in one codebase: sender response versus broadcast, public versus private streams, optimistic state versus server-rendered state, reconnect behavior, and tests that have to update a second session instead of only returning a 200.

What you work through

Each chapter builds on the same application, so later features have to work with the decisions made earlier.

01Introduction and Setup
02How Real-Time Works
03Turbo Drive: The Zero-JavaScript SPA
04Turbo Frames: Scoped Updates
05Turbo Streams: Multi-Target Updates
06Advanced Turbo Streams
07Stimulus Deep Dive
08Action Cable Deep Dive
09Importmaps and JavaScript the Rails Way
10Testing Real-Time Features

The docs cover the APIs. They don't make the architecture decisions.

Realtime Rails covers the choices that show up once the examples stop being isolated snippets.

For Rails developers building live features, not frontend platforms.

Normal Rails knowledge is enough. The goal is to add live behavior without turning the application into two applications.

Hotwire still feels fuzzy

You have used a frame or Turbo Stream before, but the boundaries between Drive, Frames, Streams, Stimulus, and Action Cable are not yet automatic.

React or Vue is the familiar answer

You want to see where Rails can keep interactivity and live state server-driven without pretending every browser interaction belongs on the server.

You are building a Rails product

You need live updates, notifications, presence, or collaborative features without adding another application to deploy and maintain.

The easy Turbo demo already works

Now the problems are duplicate updates, stream scoping, reconnects, DOM identity, testing, and deciding when a custom channel is warranted.

What you get

The book, the working Switchboard source, product updates, and the upcoming Agent Companion.

PDF + ePub

The complete book in both formats, with updates delivered through Gumroad.

Chapter source

The working Switchboard code for comparing an implementation or jumping directly to a later chapter state.

Rails 8 updates

Material updates when framework behavior changes enough to affect the patterns or examples in the guide.

Agent Companion

Coming soon. A portable context pack for Codex, Claude Code, and other coding agents to adapt the book's patterns inside an existing Rails application.

Realtime Rails

Build the full feature once, then use the same approach in your own Rails app.

$39

One-time purchase · PDF + ePub + source + updates

Get Realtime Rails
  • 10-chapter Realtime Rails book
  • Chapter-by-chapter application source
  • Rails 8 material updates
  • Agent Companion when it ships

Full refund by email if the book isn't useful. No time limit.

Read a complete sample chapter.

Enter your email for a complete sample chapter. It uses the same code and level of detail as the full book.

FAQ

Rails basics are assumed. React, Vue, Node, Redis, and a separate frontend are not.

Rails experience required

Comfort with models, controllers, views, routes, and running a Rails app locally is enough. For a broader Rails-from-the-ground-up guide, Build a SaaS App in Ruby on Rails 8 starts much earlier.

Does this require React, Vue, Node, or Redis?

No. The book starts from modern Rails 8 defaults: Turbo, Stimulus, import maps, and Solid Cable. Custom JavaScript and different infrastructure are covered where they become useful.

Why a chat app?

Chat forces real-time problems to surface quickly: multiple sessions, private streams, presence, typing state, reconnects, and optimistic UI. The same patterns apply to dashboards, notifications, status changes, collaborative UI, and background-job progress.

What is the Agent Companion?

A portable context pack built from the book's implementation patterns so Codex, Claude Code, and other coding agents can inspect an existing Rails application and adapt those patterns instead of copying the demo app. It is coming soon and will be added to the existing Realtime Rails product.

What formats are included?

PDF and ePub, plus the chapter-by-chapter source code and product updates through Gumroad.

Refund policy

A full refund is available by email. No time limit and no hoops.

About the author

Rob Race

Hi, I'm Rob. I run Succinct Software and have been building web apps professionally for over 11 years. My current active Rails SaaS project is CatchHook, a webhook debugging app for inspecting and replaying requests. You can find more of my writing on my blog.

I also wrote Build a SaaS App in Ruby on Rails. Realtime Rails came from the same kind of gap: plenty of material explains the individual APIs, but fewer examples keep going until the whole feature works.