是这样
为了试验,我拷贝了 DHH 的这个例子作为学习样本
启动 cable、rails server 和 redis 后访问页面,结果浏览器端总是报错说 websocket 连接无法建立
log 显示 puma 接收到了请求,但是没有 render 任何东西
Puma starting in single mode...
* Version 2.15.3 (ruby 2.2.2-p95), codename: Autumn Arbor Airbrush
* Min threads: 0, max threads: 16
* Environment: development
* Listening on tcp://0.0.0.0:3001
Use Ctrl-C to stop
127.0.0.1 - - [06/Apr/2016 12:30:25] "GET / HTTP/1.1" HIJACKED -1 0.0006
127.0.0.1 - - [06/Apr/2016 12:30:33] "GET / HTTP/1.1" HIJACKED -1 0.0008
127.0.0.1 - - [06/Apr/2016 12:30:42] "GET / HTTP/1.1" HIJACKED -1 0.0006
127.0.0.1 - - [06/Apr/2016 12:33:00] "GET / HTTP/1.1" HIJACKED -1 0.0006
127.0.0.1 - - [06/Apr/2016 12:33:06] "GET / HTTP/1.1" HIJACKED -1 0.0007
127.0.0.1 - - [06/Apr/2016 12:33:15] "GET / HTTP/1.1" HIJACKED -1 0.0007
127.0.0.1 - - [06/Apr/2016 12:33:22] "GET / HTTP/1.1" HIJACKED -1 0.0008
127.0.0.1 - - [06/Apr/2016 12:33:30] "GET / HTTP/1.1" HIJACKED -1 0.0008
127.0.0.1 - - [06/Apr/2016 12:33:39] "GET / HTTP/1.1" HIJACKED -1 0.0008
由于代码是现成的,所以应该是我部署的问题。测试了一下 redis 和 puma 运行正常,gem 依赖也没有问题。
请教还有哪些可能会导致这个现象?