杀掉会重新开启rails s的进程
运行了rails s 后出现了一下的错误:
/.rvm/gems/ruby-1.9.3-p374/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)
解决方案一: rails s -p4000 开启另外一个端口,4000可以被代替为其他的任何数字
如果不想开启其他端口,执行第二种方案:
运行:
$ ps ax | grep rails
运行结果:
12694 pts/0 Tl 7:54 xx/.rvm/rubies/ruby-1.9.3-p374/bin/ruby script/rails s
17762 pts/8 Sl+ 0:12 xx/.rvm/rubies/ruby-1.9.3-p374/bin/ruby script/rails c
19554 pts/0 S+ 0:00 grep rails
再运行: kill -9 12694 杀掉进程
rails s 可以了