Thin web server: `start_tcp_server': no acceptor (RuntimeError) after git branch checkout

后端 未结 9 896
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-29 16:00

A Rails 3.2.0 app, working fine with Thin web server, both locally and on Heroku cedar stack.

After:

$ git branch work
$ git checkout work
$ rails se         


        
相关标签:
9条回答
  • 2020-11-29 16:10

    I had this error because I was already running rails in another terminal. Closing my other project fixed this.

    0 讨论(0)
  • 2020-11-29 16:13

    Execute this in the terminal

    sudo netstat -lpn |grep rails
    

    And then

    sudo kill <job id>
    
    0 讨论(0)
  • 2020-11-29 16:14

    This works for me. Find (zombie?) server (can happen when quitting terminal with server running):

    $ ps ax | grep rails
    

    If it returns something like:

    33467 s002 S+ 0:00.00 grep rails
    33240 s003 S+ 0:15.05 /Users/Arta/.rbenv/versions/1.9.2-p290/bin/ruby script/rails s -p 3000
    

    kill it, and run anew:

    $ kill -9 33240
    $ rails s
    
    0 讨论(0)
  • 2020-11-29 16:15

    rvmsudo rails server thin -p 3000

    Does it for me

    0 讨论(0)
  • 2020-11-29 16:15

    I ran into a similar issue after getting back to the office from vacation. I run my server on the local IP as:

    rails s thin -b <my_ip>
    

    The problem was that my IP had changed, I just needed to use the new one.

    0 讨论(0)
  • 2020-11-29 16:18

    The port 3000 may already be in use. Look at http://mrjaba.posterous.com/starttcpserver-no-acceptor-runtimeerror

    0 讨论(0)
提交回复
热议问题