ROR + A server is already running. Check …/tmp/pids/server.pid. Exiting

后端 未结 14 1900
渐次进展
渐次进展 2020-12-22 23:55

In my Rails Project, I am trying to run two different servers at different port. But it fails by giving this error at console.

C:\\Rails>rails s
=> Boo         


        
14条回答
  •  南笙
    南笙 (楼主)
    2020-12-23 00:28

    I find myself coming back to this webpage a lot to find the lsof -wni tcp:3000 command so I've found this method to be easier.

    If you get this message:

    A server is already running. Check /Users/username/project/tmp/pids/server.pid.
    Exiting
    

    And if you're running on a unix system (mac or linux) you can run these commands:

    $ cat /Users/username/project/tmp/pids/server.pid
    
    # output
    
    71030
    
    # Kill the process
    
    $ kill -9 71030
    

    Then run your server again!

提交回复
热议问题