Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby Ruby on Rails 5 Basics Creating an App Creating a Rails App

Nelly Nelly
Nelly Nelly
7,134 Points

error when running rails server

hi... I am having this problem:

rails s
=> Booting Puma
=> Rails application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.6.0 (ruby 2.3.1-p112), codename: Sleepy Sunday Serenity
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://localhost:3000
/Users/nelly/.rvm/gems/ruby-2.3.1/gems/puma-3.6.0/lib/puma/binder.rb:266:in `initialize': Address already in use - bind(2) for "::1" port 3000 (Errno::EADDRINUSE)

I know I can run another server like 3001 -p but I'd like to fix this ...

Thanks for your help

maybe Steve Hunter could help ?

Nelly Nelly
Nelly Nelly
7,134 Points

allright finally found out :

Run this

lsof -wni tcp:3000 

you 'll get

ruby    64500 nelly   12u  IPv6 0x82da83a187e89491      0t0  TCP [::1]:hbci (

then run

kill -9 64500

1 Answer

Ethan Rivas
Ethan Rivas
9,979 Points

How are you closing your bin/rails server command?.

That error comes because you already have a server running in that port, maybe you're closing your server with ctrl + z, that puts your server "paused/suspended" and for continue using it you just need type fgright in the console.

  • You should use: ctrl + c to end your current rails server.

If that's not your case you can still killing the server in that way :p

Nelly Nelly
Nelly Nelly
7,134 Points

I didn't have any server running, I always do the ctrl + cI don't know what happened, but the solution was to kill as mentionned above :) thanks anyway :)