While running Sinatra, I accidentally hit ctrl+z to stop the server instead of ctrl+c Ctr+z seem to stop the application. But now I can't restart it. Please help.
^Z
[1]+ Stopped ruby app.rb
jeffrey-mac:scta JCWitt$ ruby app.rb
[2014-01-23 11:34:24] INFO WEBrick 1.3.1
[2014-01-23 11:34:24] INFO ruby 1.9.3 (2012-04-20) [x86_64-darwin11.4.2]
[2014-01-23 11:34:24] WARN TCPServer Error: Address already in use - bind(2)
[2014-01-23 11:34:24] WARN TCPServer Error: Address already in use - bind(2)
[2014-01-23 11:34:24] WARN TCPServer Error: Address already in use - bind(2)
== Someone is already performing on port 4567!
When pressing Ctrl+Z, you are pausing an application and sending it to the background. It will not execute but it will not be killed either and resources used by it (e.g. open files or network sockets) continue to be bound to the application.
You can resume the app by running fg
(which is short for foreground) in your shell.
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