CTRL+C to Webbrick server ignored

后端 未结 8 583
半阙折子戏
半阙折子戏 2021-01-04 12:51

In the past, I could exit my rails application launched using webbrick using CtrlC. At some point in development, this functionality broke ( Ctrl<

相关标签:
8条回答
  • 2021-01-04 13:22

    I was experiencing this problem on Ubuntu 11.04, Ruby 1.9.2p290. This fixed it for me:

    Remove all existing Ruby & Ruby-related packages

    Install RVM

    Install Ruby 1.9.3

    $ rvm install 1.9.3
    $ rvm use 1.9.3
    

    Make sure it works

    $ ruby -v
    ruby 1.9.3dev (2011-09-23 revision 33323) [x86_64-linux]
    

    Install all your gems, etc...

    0 讨论(0)
  • 2021-01-04 13:25

    Try Ctrl+Break. It should work.

    0 讨论(0)
  • 2021-01-04 13:30

    For windows users, this was broken in more recent builds of rails (3.2+). Try using

    ruby script\rails server
    

    instead. More details here.

    0 讨论(0)
  • 2021-01-04 13:32

    Interesting experience (and good workaround for the next weeks):

    If you are under Ubuntu and use Guake for quick terminal access, you can launch

    rails s
    

    there. Ctrl + C reproducibly works there for me and stops the server.

    Hope I could help! :)

    0 讨论(0)
  • 2021-01-04 13:36

    I had the same issue with an application. It would seem that the issue is not with the authlogic gem but with the ":git" option. My entry causing webrick & mongrel to stop responding to Ctrl+C was

    gem 'globalize3', :git => 'git://github.com/refinerycms/globalize3.git'
    
    0 讨论(0)
  • 2021-01-04 13:36

    I have been experiencing similar issues, specifically on Ubuntu 11.04 (things were fine on 10.04). I've created another question that was more specific to my particular setup, but it sounds like there is a lot of crossover, so people might be interested in reading it as well: Can't stop WEBrick 1.3.1 with ctrl-c on Ubuntu 11.04

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