Reputation: 1098
I was running Linux Mint 13 prior to now, and just switched to Fedora 17. Since I have made the switch, I can no longer stop Webrick. I use Jetbrains Rubymine, and starting the server works fine, but as soon as I hit stop, or restart, it somehow detatches from the processes and I cannot use that port again until I reboot my computer. My first thoughts were that it was a problem with Rubymine, but when I start the server in a console, it does the exact same thing. I hit ctrl-c to stop it (and it appears to do so), but as soon as I go to start the server again on that port, it fails because of duplicate address in use.
Upvotes: 2
Views: 4352
Reputation: 707
I have this error on Mint (opposite to you, as I see) - Ubuntu machine always exits fine by CTRL+C. Solution without restarting your machine: kill Webrick process. Search for a PID of detached server process via ps aux | grep rails
command and then kill it via kill -9 <PID>
In one line you can run this in your project dir:
kill -9 `cat tmp/pids/server.pid`
(You can also set this command as an alias in your .bash_profile, to use more easily)
Or is there no Webrick process to kill, whatsoever?
Upvotes: 1