每当我尝试跑步时
bundle exec puma -C config/puma.rb --port 5000
Run Code Online (Sandbox Code Playgroud)
我不断得到
bundler: failed to load command: puma (/Users/ogirginc/.asdf/installs/ruby/2.7.2/bin/puma)
Errno::EADDRINUSE: Address already in use - bind(2) for "0.0.0.0" port 5000
Run Code Online (Sandbox Code Playgroud)
我已经尝试过任何我能想到或读到的东西。这是列表:
1. 重启 Mac。
2.找到PID并杀掉。
lsof -wni tcp:5000COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
ControlCe 6071 ogirginc 20u IPv4 0x1deaf49fde14659 0t0 TCP *:commplex-main (LISTEN)
ControlCe 6071 ogirginc 21u IPv6 0x1deaf49ec4c9741 0t0 TCP *:commplex-main (LISTEN)
Run Code Online (Sandbox Code Playgroud)
杀与sudo kill -9 6071.
当我杀死它时,它会使用新的 PID 重新启动。
> lsof -wni …Run Code Online (Sandbox Code Playgroud)