Action Cable ‘Hello World’ with Rails 5.1

Stefan Wintermeyer
Apr 3, 2017 · 3 min read

What we want to achieve

Use Action Cable to shoot a “Hello World!” from the console to the web browser.

The Rails Application Setup

config/routes.rb
app/views/page/index.html.erb
app/assets/javascripts/application.js

Creating a Channel

app/assets/javascripts/page.coffee
app/channels/web_notifications_channel.rb
Gemfile
config/cable.yml

Start the server

The Screencast

Ruby Inside

Ruby articles and posts

Stefan Wintermeyer

Written by

Ruby on Rails, Phoenix Framework, WebPerf and Photography. Father of two. German and English.

Ruby Inside

Ruby articles and posts