有人能告诉我为什么我有这个错误..?!当我统治命令rails s
并且我一直试图在几个端口运行它仍然无法工作!
Booting WEBrick
=> Rails 4.0.1 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[2014-02-11 11:32:26] INFO WEBrick 1.3.1
[2014-02-11 11:32:26] INFO ruby 1.9.3 (2013-11-22) [i386-mingw32]
[2014-02-11 11:32:26] WARN TCPServer Error: Only one usage of each socket address (protocol/network address/port) is normally permitted. - bind(2)
Exiting
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/utils.rb:85:in `initialize': Only one usage of each socket address (protocol/network address/port) is normally permitted. - bind(2)
(Errno::EADDRINUSE)
答案 0 :(得分:2)
以前的服务器没有正确终止,因此您可以根据需要在不同的端口上运行服务器(或杀死之前的rails进程):
bundle exec rails s -p 3001
答案 1 :(得分:0)
尝试查找并终止rails使用的进程
lsof -wni tcp:3000
kill -9 PID