Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Anthony Ho10,228 Points
Can't start the rails server
Shows an error
[2014-10-13 12:46:24] INFO WEBrick 1.3.1 [2014-10-13 12:46:24] INFO ruby 2.1.2 (2014-05-08) [x86_64-darwin13.0] Exiting /Users/AnthonyHo/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/socket.rb:206:in `bind': Address already in use - bind(2) for 0.0.0.0:3000 (Errno::EADDRINUSE) from /Users/AnthonyHo/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/socket.rb:206:in `listen' from /Users/AnthonyHo/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/socket.rb:461:in `block in tcp_server_sockets' from /Users/AnthonyHo/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/socket.rb:232:in `each' from /Users/AnthonyHo/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/socket.rb:232:in `foreach' from /Users/AnthonyHo/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/socket.rb:459:in `tcp_server_sockets' from /Users/AnthonyHo/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/utils.rb:75:in `create_listeners' from /Users/AnthonyHo/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/server.rb:132:in `listen' from /Users/AnthonyHo/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/server.rb:113:in `initialize' from /Users/AnthonyHo/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:45:in `initialize' from /Users/AnthonyHo/.rvm/gems/ruby-2.1.2/gems/rack-1.5.2/lib/rack/handler/webrick.rb:11:in `new' from /Users/AnthonyHo/.rvm/gems/ruby-2.1.2/gems/rack-1.5.2/lib/rack/handler/webrick.rb:11:in `run' from /Users/AnthonyHo/.rvm/gems/ruby-2.1.2/gems/rack-1.5.2/lib/rack/server.rb:264:in `start' from /Users/AnthonyHo/.rvm/gems/ruby-2.1.2/gems/railties-4.0.1/lib/rails/commands/server.rb:84:in `start' from /Users/AnthonyHo/.rvm/gems/ruby-2.1.2/gems/railties-4.0.1/lib/rails/commands.rb:76:in `block in <top (required)>' from /Users/AnthonyHo/.rvm/gems/ruby-2.1.2/gems/railties-4.0.1/lib/rails/commands.rb:71:in `tap' from /Users/AnthonyHo/.rvm/gems/ruby-2.1.2/gems/railties-4.0.1/lib/rails/commands.rb:71:in `<top (required)>' from bin/rails:4:in `require' from bin/rails:4:in `<main>'
Daniel CardenasCourses Plus Student 9,236 Points
Type this in your terminal to find out the PID of the process that's using the 3000 port:
'lsof -wni tcp:3000'
Then, use the number in the PID column to kill the process:
'kill -9 PID'
Make sure you substitute PID with the actual number that you see under the PID for example 'kill -9 11734'
Hopefully that works.