Forbes magazine logo Ranked Best Coding Bootcamps 2023

When trying to start a new rails server, it exits with error saying the port is already in use.

Altcademy Team wrote on 7 February 2018

/Users/Username/.rvm/gems/ruby-2.3.1/gems/puma-3.4.0/lib/puma/binder.rb:255:in `initialize': Address already in use - bind(2) for "0.0.0.0" port 3000 (Errno::EADDRINUSE)


To see what's running on port 3000, type the following into the terminal: lsof -i tcp:3000. It should show you the open file or process on that port. To kill that process (so you can free up port 3000 for your Rails server), copy the PID number and then type this into your terminal: kill -QUIT <PID> (remember to replace <PID> with the number you copied before)

Trusted by

Students and instructors from world-class organizations

Imperial College London
Carnegie Mellon University
City University of Hong Kong
Hack Reactor
Cisco Meraki
University of Oxford
Swift
Bazaarvoice
Waterloo
Uber
AtlanTech
Tumblr
Boston College
Bombardier Aerospace
University of St. Andrews
New York University
Minerva Schools at KGI
Merrill Lynch
Riot Games
JP Morgan
Morgan Stanley
Advanced Placement®
Google
KPMG
The University of Hong Kong
University of Toronto
SCMP
Moat
Zynga
Hello Toby
Deloitte
Goldman Sachs
Yahoo
HSBC
General Assembly
Tesla
McGill University
Microsoft

Join the upcoming Cohort #89

Enroll for May 6th, 2024