drewrobb
drewrobb

Reputation: 1604

CTRL+C to Webbrick server ignored

In the past, I could exit my rails application launched using webbrick using CtrlC. At some point in development, this functionality broke ( CtrlC does nothing now). I'm lead to believe this was caused by changes in one of my gem dependencies, as the problem is also present when checking out a really old version of the application, using the current gemset.

My question is: how can I fix this problem, or at least find the out what is causing it?

Upvotes: 11

Views: 5079

Answers (8)

Hugo
Hugo

Reputation: 91

Try Ctrl+Break. It should work.

Upvotes: 9

lambinator
lambinator

Reputation: 11029

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

ruby script\rails server

instead. More details here.

Upvotes: 10

PJK
PJK

Reputation: 2112

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...

Upvotes: 0

Dorian
Dorian

Reputation: 11

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! :)

Upvotes: 1

Gordon McCreight
Gordon McCreight

Reputation: 2659

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

Upvotes: 0

Christos Vogiatzis
Christos Vogiatzis

Reputation: 51

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'

Upvotes: 5

drewrobb
drewrobb

Reputation: 1604

Seemed to have solved my own problem. Authlogic

gem "authlogic", :git => 'http://github.com/binarylogic/authlogic.git'

appears to be the root cause of this problem. I've opened an issue here

Upvotes: 0

Related Questions