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 trial

Ruby Build a Simple Ruby on Rails Application Getting Started with Rails Generate a Rails Application

Rails server error

Getting the following error

=> Booting WEBrick
=> Rails 4.1.1 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0
.0.1 (--binding option)
=> Ctrl-C to shutdown server
[2014-07-03 23:44:07] INFO  WEBrick 1.3.1
[2014-07-03 23:44:07] INFO  ruby 1.9.3 (2014-02-24) [i386-mingw32]
[2014-07-03 23:44:07] WARN  TCPServer Error: Only one usage of each socket addre
ss (protocol/network address/port) is normally permitted. - bind(2)
Exiting
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/utils.rb:85:in `initialize':
Only one usage of each socket address (protocol/network address/port) is normall
y permitted. - bind(2) (Errno::EADDRINUSE)
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/utils.rb:85:in `
new'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/utils.rb:85:in `
block in create_listeners'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/utils.rb:82:in `
each'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/utils.rb:82:in `
create_listeners'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/server.rb:82:in
`listen'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/server.rb:70:in
`initialize'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpserver.rb:45
:in `initialize'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib
/rack/handler/webrick.rb:11:in `new'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib
/rack/handler/webrick.rb:11:in `run'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib
/rack/server.rb:264:in `start'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.1.1
/lib/rails/commands/server.rb:69:in `start'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.1.1
/lib/rails/commands/commands_tasks.rb:81:in `block in server'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.1.1
/lib/rails/commands/commands_tasks.rb:76:in `tap'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.1.1
/lib/rails/commands/commands_tasks.rb:76:in `server'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.1.1
/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.1.1
/lib/rails/commands.rb:17:in `<top (required)>'
        from bin/rails:4:in `require'
        from bin/rails:4:in `<main>'

4 Answers

Zachary Snyder
Zachary Snyder
6,659 Points

Actually here we go try this bud

Looks like your rails server is binding to 0.0.0.0 by default which is a nono so run this

rails server -b 127.0.0.1:3000

That should fix your issue

Zachary Snyder
Zachary Snyder
6,659 Points

Just a precaution I would do is run the following command inside your rails directory.

Bundle install

The only other thing I could say is something is using the port 3000 that webrick normally binds too

That worked, thanks mate!