无法启动 Rails 开发,Cloud 9

Can't Start Rails Development,Cloud 9

我曾尝试使用来自云 9 的这篇文章杀死我的 rails 服务器。

我正在使用 gem thin,每次尝试 运行 云服务器命令时,我都会收到此错误

rails s -b $IP -p $PORT
=> Booting Thin
=> Rails 4.2.6 application starting in development on http://0.0.0.0:8080
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Thin web server (v1.6.4 codename Gob Bluth)
Maximum connections set to 1024  
Listening on 0.0.0.0:8080, CTRL+C to stop
Exiting
/usr/local/rvm/gems/ruby-2.3.0/gems/eventmachine-1.2.0.1/lib/eventmachine.rb:530:in `start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)
    from /usr/local/rvm/gems/ruby-2.3.0/gems/eventmachine-1.2.0.1/lib/eventmachine.rb:530:in `start_server'
    from /usr/local/rvm/gems/ruby-2.3.0/gems/thin-1.6.4/lib/thin/backends/tcp_server.rb:16:in `connect'
    from /usr/local/rvm/gems/ruby-2.3.0/gems/thin-

full error

此错误表明,8080 端口已被使用,您可能需要为您的应用程序使用不同的端口

更新:

尝试终止现有进程。使用此命令 ps -ef | grep thin 查找端口号,然后将其杀死 kill -9 <port>。立即试用 运行 您的应用。

好像是8080端口被占用了,要使用端口查找PID,运行:

netstat -tulpn | grep :8080

那你可以kill -9 <PID>