Why does ActionCable in Rails 5.0 not work for me



I am trying to implement ActionCable in 1 of my projects ‘assignment-cloned’ and could not get it to work. I have now started a separate project ‘Clock’ which has less of the jargon for my assignment and more clean code to learn ActionCable but for some reason I still can not get ActionCable to work.

Please feel free to look at my projects here https://c9.io/pas43

As you can see ‘Clock’ is very minimal and I have followed the tutorial I’m reading step by step but i still can not get the example to work. I’ve been trying a few examples now as well as trying to implement it into my own project and non of them seem to work where am I going wrong?




I have come to your conclusion. I even tried to do DHH sample github, yet it does not work for me.

I feel something is wrong or some ports are close at c9. lemme know if you have more info.


I found this
By the way, if you’re using a cloud IDE you will probably have to add an “allowed request origin” to the development environment. For example, on my Rails Tutorial workspace at Cloud9, my development configuration looks like Listing 23.

Listing 23: Action Cable configuration at Cloud9.
Rails.application.configure do

Add Cloud9 origin for Action Cable requests.

config.action_cable.allowed_request_origins = [
https://rails-tutorial-mhartl.c9users.io’ ]

source: https://www.learnenough.com/action-cable-tutorial#code-message_form_remote