websocket - Rails 5 actioncable undefined method `fetch' for nil:NilClass -


i using rails 5 actioncable , getting this error when trying send throws actioncable should do? i'm trying push project heroku.

nomethoderror in messagescontroller#create  undefined method `fetch' nil:nilclass extracted source (around line #37):  #35       # makes sure proper dependencies required. #36       def pubsub_adapter *37         adapter = (cable.fetch('adapter') { 'redis' }) #38         path_to_adapter = "action_cable/subscription_adapter/#{adapter}" #39         begin #40           require path_to_adapter  extracted source (around line #50):  #48       # adapter used streams/broadcasting. #49       def pubsub *50         @pubsub ||= config.pubsub_adapter.new(self) #51       end #52  #53       # identifiers applied connection class associated server.  extracted source (around line #42):  #40           def broadcast(message) #41             server.logger.info "[actioncable] broadcasting #{broadcasting}: #{message}" *42             server.pubsub.broadcast broadcasting, activesupport::json.encode(message) #43           end #44         end #45     end   rails.root: /media/adham/data/code/rails5test  application trace app/controllers/messages_controller.rb:6:in `create' app/middleware/chat_action_cable.rb:10:in `call' 

there commit made here: enter link description here

reading through , changing config file actioncable from...

config/redis/cable.yml

to

config/cable.yml

...fixed issue. update allow actioncable backend agnostic.


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -