I\'m using RVM, Ruby 1.9.2, and Rails 3.0.7
A standard kill of the process from another terminal doesn\'t work, either, but kill -9 does, of course.
I found
I had the same problem when updating my Ubuntu. Impossible to quit normally webrick using Ctrl+C, had to use kill -9
...
I'm having a similar problem, have been using Ctrl+Z to pause the job, then kill -9 %1
to kill the first paused job. Roundabout way of killing it, but it works.
See this question on Superuser for more info: https://superuser.com/questions/243460/what-to-do-when-ctrl-c-cant-kill-a-process
If ctr+c is not working, then before going to implement the methods mentioned , just see your terminal settings. Sometimes it may happen that we change the shortcut keys of terminal as our convenience. And we assign ctr+c for copying content of terminal. In this case ctr+c wont work for stopping the server, instead it will be used as copy purpose.
If the settings are not changed then try using another port like 4000.
used this line to create shortcut with ccsm (compiz conig settings manager or smth like this) -> commands:
kill -9 `pgrep -fl 'script/rails s' | awk '{print $1}'`
set to (ctrl+shift+`) or anything you like
Found some kind of solution. Run in terminal:
stty -echoctl
And then Ctrl-C will work. http://linux.m2osw.com/remove-ctrl-C-from-being-printed-in-console
Worked just for one session. Posted better solution near.
Ok, the issue has been resolved for me. A recent kernel update, which I applied as part of Ubuntu's standard updates, fixed the problem.
Also, here is a good discussion of the issue, which explains that the root cause was a kernel regression introduced in 2.6.38 ( http://redmine.ruby-lang.org/issues/4777 )
The regression was patched, and it looks like the patch recently made it into Ubuntu's updates, so if you're being affected by this issue, you should apply the latest updates.