uninitialized constant > ActionCable::Server::Configuration::ApplicationCable

后端 未结 4 1860
伪装坚强ぢ
伪装坚强ぢ 2021-01-04 06:23

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

4条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-04 06:55

    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
    

提交回复
热议问题