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! While you're at it, check out some resources Treehouse students have shared here.
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 trialNelly Nelly
7,134 Pointserror when running rails server
hi... I am having this problem:
rails s
=> Booting Puma
=> Rails 5.0.0.1 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
Exiting
/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 ?
1 Answer
Ethan Rivas
9,979 PointsHow 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 fg
right 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
7,134 PointsI didn't have any server running, I always do the ctrl + c
I don't know what happened, but the solution was to kill as mentionned above :)
thanks anyway :)
Nelly Nelly
7,134 PointsNelly Nelly
7,134 Pointsallright finally found out :
Run this
lsof -wni tcp:3000
you 'll get
then run
kill -9 64500