A server is already running. Check …/tmp/pids/server.pid. Exiting - rails

前端 未结 19 1439
礼貌的吻别
礼貌的吻别 2021-01-29 20:35
..$ rails s
=> Booting WEBrick
=> Rails 4.0.4 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=>         


        
19条回答
  •  执笔经年
    2021-01-29 20:58

    Run this command -

    lsof -wni tcp:3000

    then you will get the following table -

    COMMAND  PID  USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
    ruby    2552 shyam   17u  IPv4  44599      0t0  TCP 127.0.0.1:3000 (LISTEN)
    ruby    2552 shyam   18u  IPv6  44600      0t0  TCP [::1]:3000 (LISTEN)

    Run this command and replace PID from the Above table

    kill -9 PID

    example:

    kill -9 2552

提交回复
热议问题