参考:https://stackoverflow.com/questions/27851440/eventmachine-start-tcp-server-no-acceptor-port-is-in-use-or-requires-root

运行bundle exec ruby xxx.rb出现 了报错

杀掉一个进程就可以了

 ps ax | grep rails
   5772 pts/5    Sl+    0:03 puma 5.6.4 (tcp://localhost:3000) [rails_cable_test]
  17731 pts/3    S+     0:00 grep --color=auto rails
linlin@linlin-i5:/workspace/eventmachine-websockets-demo$ kill 5772
linlin@linlin-i5:/workspace/eventmachine-websockets-demo$ bundle exec ruby app.rb
== Sinatra/1.4.3 has taken the stage on 3000 for development with backup from Thin
>> Thin web server (v1.5.1 codename Straight Razor)
>> Maximum connections set to 1024
>> Listening on localhost:3000, CTRL+C to stop