{"action":"closed","issue":{"url":"https://api.github.com/repos/rails/actioncable/issues/108","labels_url":"https://api.github.com/repos/rails/actioncable/issues/108/labels{/name}","comments_url":"https://api.github.com/repos/rails/actioncable/issues/108/comments","events_url":"https://api.github.com/repos/rails/actioncable/issues/108/events","html_url":"https://github.com/rails/actioncable/issues/108","id":114018953,"number":108,"title":"can't connect to websocket","user":{"login":"Electrofenster","id":4255745,"avatar_url":"https://avatars.githubusercontent.com/u/4255745?v=3","gravatar_id":"","url":"https://api.github.com/users/Electrofenster","html_url":"https://github.com/Electrofenster","followers_url":"https://api.github.com/users/Electrofenster/followers","following_url":"https://api.github.com/users/Electrofenster/following{/other_user}","gists_url":"https://api.github.com/users/Electrofenster/gists{/gist_id}","starred_url":"https://api.github.com/users/Electrofenster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Electrofenster/subscriptions","organizations_url":"https://api.github.com/users/Electrofenster/orgs","repos_url":"https://api.github.com/users/Electrofenster/repos","events_url":"https://api.github.com/users/Electrofenster/events{/privacy}","received_events_url":"https://api.github.com/users/Electrofenster/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-10-29T10:16:46Z","updated_at":"2015-10-29T17:37:00Z","closed_at":"2015-10-29T17:37:00Z","body":"I can't connect to the actioncable websocket.\r\n\r\nI added this line to my routes.rb\r\n```ruby\r\nmatch \"/websocket\", :to => ActionCable.server, via: [:get, :post]\r\n```\r\nand I added this files to my app path:\r\n\r\ncable/config.ru\r\n```ruby\r\n# cable/config.ru\r\nrequire ::File.expand_path('../../config/environment',  __FILE__)\r\nRails.application.eager_load!\r\n\r\nrequire 'action_cable/process/logging'\r\n\r\nrun ActionCable.server\r\n```\r\n\r\nchannels/application_cable/channel.rb\r\n```ruby\r\nmodule ApplicationCable\r\n  class Channel < ActionCable::Channel::Base\r\n  end\r\nend\r\n```\r\n\r\nchannels/application_cable/connection.rb\r\n```ruby\r\nmodule ApplicationCable\r\n  class Connection < ActionCable::Connection::Base\r\n    identified_by :current_user\r\n\r\n    def connect\r\n      self.current_user = find_verified_user\r\n    end\r\n\r\n    protected\r\n      def find_verified_user\r\n        if current_user\r\n          current_user\r\n        else\r\n          reject_unauthorized_connection\r\n        end\r\n      end\r\n  end\r\nend\r\n```\r\n\r\nand my javascriptfiles under assets/javascript/channels/index.coffee\r\n```coffee\r\n#= require cable\r\n#= require_self\r\n#= require_tree .\r\n\r\n@App = {}\r\n# I tried both but it doesn't work\r\n# App.cable = Cable.createConsumer 'ws://localhost:28080'\r\n# App.cable = Cable.createConsumer 'ws://localhost/websocket'\r\n```\r\n\r\nthen I started my rails app with puma:\r\n````bash\r\nTRUSTED_IP=192.168.0.0/16 rails s -b 192.168.56.101 Puma\r\n```\r\n\r\nand my ActionCalbe-Server with:\r\n```bash\r\nbundle exec puma -p 28080 cable/config.ru\r\n```\r\n\r\nWhen I opened my application in the browser I get this errors:\r\n```\r\nFirefox kann keine Verbindung zu dem Server unter ws://localhost:28080/ aufbauen.\r\nFirefox kann keine Verbindung zu dem Server unter ws://localhost/websocket aufbauen.\r\n```\r\n\r\nWhat's wrong with my settings? "}}