Rails server says port already used, how to kill that process?

前端 未结 12 2648
深忆病人
深忆病人 2020-12-02 03:26

I\'m on a mac, doing:

rails server

I get:

2010-12-17 12:35:15] INFO  WEBrick 1.3.1
[2010-12-17 12:35:15] INFO  ruby 1.8.7 (         


        
12条回答
  •  感动是毒
    2020-12-02 04:06

    For anyone stumbling across this question that is not on a Mac: assuming you know that your server is running on port 3000, you can do this in one shot by executing the following:

    fuser -k 3000/tcp
    

    But as Toby has mentioned, the implementation of fuser in Mac OS is rather primitive and this command will not work on mac.

提交回复
热议问题