When I am running server its throwing error shown in logs below. I googled a lot but didn\'t get reason behind it. Somebody please put some light on it.
Gemfile
According to DHH's video tutorial from yesterday, there's an issue between Spring
and an ActionCable
dependency, so until the final release of Rails 5 you will need to recreate your project with the --skip-spring
option.
I had the same problem when trying to use ActionCable with Rails 4.2.5 and the solution was to add the following to config/application.rb:
config.autoload_paths += %W(#{config.root}/app/channels)
This is with the ActionCable gem:
gem 'actioncable', github: 'rails/actioncable', branch: 'archive'
The error is related to not having the correct ActionCable files in your project. You need app/channels/application_cable/channel.rb
that looks like this
module ApplicationCable
class Channel < ActionCable::Channel::Base
end
end
and app/channels/application_cable/connection.rb
module ApplicationCable
class Connection < ActionCable::Connection::Base
end
end
If you upgraded from previous version (when actioncable was not in the bundle), check if config/application.rb
contains
require "action_cable/engine"