I'm using the default "rails server" command to launch a web server from the command line. For some reason, neither CTR+C nor CTR+Z seem to shutdown the server.
The web server appears to be running normally. Closing the terminal does shutdown the web server. CTR+C has the normal copy behavior in other applications. I'm having this problem when I launch the web server from the Windows command prompt and PowerShell windows.
Is this expected behavior, what could be my problem, or what can I do to investigate further?
For Rails 5.0 and above, you can use this command Use ctrl+c to shutdown your Webrick Server.
One way to shut down a rogue server is with the kill command. For the PID output above, you could kill the corresponding stuck server using kill 42612 . And if that didn't work, you could try kill -9 42612 .
You can use Ctrl + Pause or Break to stop rails server from the MS-DOS command prompt
If you use a notebook and do not have Pause and Break buttons, then you can try to stop rails server by Ctrl+Fn+Ins. It works for my Lenovo.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With