Rails: Killing a Rouge Webrick Server

If you have ever accidentally closed a terminal window which was running your Rails Webrick server and the server continued to run in the background but you need to kill it so you can restart a new instance you can do the following:

1. run the lsof command identifying port 3000 as the target to get the process ID of the rouge Webrick server

lsof -i:3000

2. then use the kill command plus the process ID you got from step 1 and your rouge will be taken care of.

kill process_id

Of course this is just one way to handle it, if anyone has a better way please comment and let the rest of us know. Thanks in advance!

Published by

Tim Clark

Experienced Business Owner, Chief Information Officer, Vice President, Chief Software Architect, Application Architect, Project Manager, Software Developer, Senior Web Developer, Graphic Designer & 3D Modeler, University Instructor, University Program Chair, Academic Director. Specialties: Ruby, Ruby on Rails, JavaScript, JQuery, AJAX, Node.js, React.js, Angular.js, MySQL, PostgreSQL, MongoDB, SQL Server, Responsive Design, HTML5, XHTML, CSS3, C#, ASP.net, Project Management, System Design/Architecture, Web Design, Web Development, Adobe CS6 (Photoshop, Illustrator)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s