[報錯紀錄]_4_Rails啟動失敗

gaodeMacBook-Air:job-listing gao$ rails s
=> Booting Puma
=> Rails 5.0.0 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.5.2 (ruby 2.3.1-p112), codename: Amateur Raccoon Rocketry
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://localhost:3000
Exiting
/Users/gao/.rvm/gems/ruby-2.3.1/gems/puma-3.5.2/lib/puma/binder.rb:268:in `initialize':
Address already in use - bind(2) for "::1" port 3000 (Errno::EADDRINUSE)
    from /Users/gao/.rvm/gems/ruby-2.3.1/gems/puma-3.5.2/lib/puma/binder.rb:268:in `new'
。。。。。。  

Address already in use

解决方法:Google找到以下
运行命令
kill -9 $(lsof -i tcp:3000 -t)

comments powered by Disqus