我正在编写一个Ruby脚本,它在后台8000端口上部署一个服务器,然后在前台向服务器发出查询。在我发出查询之后,我就会杀死服务器,但是当我关闭服务器时,它似乎是在切换端口。我在红宝石脚本中这样做:lsof -i:8000 -tRUNNING ON PORT 8000: COMMAND PID(LISTEN)kill 26364
然后,我将查看</
it runs without error,but when i go to http://127.0.0.1:8000/ chrome throws error "Oops!Google Chrome could not connect to 127.0.0.1:8000"
我知道我误解了删除服务器的结构。如果有人能教我如何使它发挥作用,我将不胜感激。