title: Heroku: Rails 5 WebSocket connection failed
body: <p>i'm trying to deploy reactjs on rails 5 app on heroku this is my Procfile</p>
  
  <pre><code>web: bundle exec puma -C config/puma.rb
  </code></pre>
  
  <p>this is my puma.rb file</p>
  
  <pre><code>workers Integer(ENV['WEB_CONCURRENCY'] || 2)
  threads_count = Integer(ENV['MAX_THREADS'] || 5)
  threads threads_count, threads_count
  
  preload_app!
  
  rackup      DefaultRackup
  port        ENV['PORT']     || 5000
  environment ENV['RACK_ENV'] || 'development'
  
  on_worker_boot do
    ActiveRecord::Base.establish_connection
  end
  </code></pre>
  
  <p>and this is my cable.yml file</p>
  
  <pre><code>production:
  :url: redis://redistogo:f9e8821e7e25167ae7023516bd3fce13@tarpon.redistogo.com:11879/
  :host: tarpon.redistogo.com
  :port: 11879
  :password: xxxx
  :inline: true
  :timeout: 1
  
  development:
    url: redis://localhost:6379/2
  
  test:
    url: redis://localhost:6379/3
  </code></pre>
  
  <p>i try to connect to the socket from reactjs using </p>
  
  <pre><code>App.cable = ActionCable.createConsumer("wss://adham-chatty.heroku.com");
  </code></pre>
  
  <p>but i have this error on chrome console and the socket don't work :\</p>
  
  <pre><code>WebSocket connection to 'wss://adham-chatty.heroku.com/' failed: WebSocket opening handshake was canceled
  </code></pre>
  
  <p>and here is my Heroku log</p>
  
  <pre><code>016-01-19T17:17:22.405051+00:00 heroku[web.1]: State changed from up to starting
      2016-01-19T17:17:25.031404+00:00 heroku[web.1]: Starting process with command `bundle exec puma -C config/puma.rb`
      2016-01-19T17:17:26.521202+00:00 heroku[web.1]: Stopping all processes with SIGTERM
      2016-01-19T17:17:27.266810+00:00 app[web.1]: [3] Puma starting in cluster mode...
      2016-01-19T17:17:27.266821+00:00 app[web.1]: [3] * Version 2.15.3 (ruby 2.2.2-p95), codename: Autumn Arbor Airbrush
      2016-01-19T17:17:27.266822+00:00 app[web.1]: [3] * Min threads: 5, max threads: 5
      2016-01-19T17:17:27.266822+00:00 app[web.1]: [3] * Environment: production
      2016-01-19T17:17:27.266823+00:00 app[web.1]: [3] * Process workers: 2
      2016-01-19T17:17:27.266823+00:00 app[web.1]: [3] * Preloading application
      2016-01-19T17:17:27.721211+00:00 app[web.1]: [3] - Gracefully shutting down workers...
      2016-01-19T17:17:28.101087+00:00 app[web.1]: [3] === puma shutdown: 2016-01-19 17:17:28 +0000 ===
      2016-01-19T17:17:28.101095+00:00 app[web.1]: [3] - Goodbye!
      2016-01-19T17:17:28.974002+00:00 app[web.1]: [3] * Listening on tcp://0.0.0.0:18058
      2016-01-19T17:17:28.974157+00:00 app[web.1]: [3] Use Ctrl-C to stop
      2016-01-19T17:17:28.978252+00:00 app[web.1]: [3] - Worker 0 (pid: 6) booted, phase: 0
      2016-01-19T17:17:28.994863+00:00 heroku[web.1]: Process exited with status 0
      2016-01-19T17:17:28.979382+00:00 app[web.1]: [3] - Worker 1 (pid: 10) booted, phase: 0
      2016-01-19T17:17:29.346266+00:00 heroku[web.1]: State changed from starting to up
  </code></pre>
  
  <p>what should i do?</p>