Monday, April 2, 2012

Rails: How to kill WEBrick 1.3.1 on Windows 7

This worked for me, using RailsInstaller on Windows 7 - launch the WEBrick process into a separate command window by using the start command:

C:\Sites\myapp>start "rails" rails s

This will open a new command window entitled "rails - rails s", running the WEBrick process, leaving the original command window available for use. 

When you're ready to kill WEBrick, just close the "rails" command window. Brutal, but effective. 

1 comment:

  1. This did not work for me. The message in the new CMD window is that my rails command has no parameter. My original probelm is that rails s seems to start 2 ruby processes. Ctrl C only kills only one of them so starting the server again fails cos the network port is still in use! weird. Anyway I installed Thin and that works better


Note: Only a member of this blog may post a comment.