start project again with a empty database


I want to start all over again with my project. So I deleted the directory and make the new project. But when I do rails s I see this error message :

WARN TCPServer Error: Address already in use - bind(2) Exiting /usr/share/ruby/webrick/utils.rb:85:in initialize': Address already in use - bind(2) (Errno::EADDRINUSE) from /usr/share/ruby/webrick/utils.rb:85:in new’ from /usr/share/ruby/webrick/utils.rb:85:in block in create_listeners' from /usr/share/ruby/webrick/utils.rb:82:in each’ from /usr/share/ruby/webrick/utils.rb:82:in create_listeners' from /usr/share/ruby/webrick/server.rb:82:in listen’ from /usr/share/ruby/webrick/server.rb:70:in initialize' from /usr/share/ruby/webrick/httpserver.rb:45:in initialize’ from /home/roelof/.gem/ruby/1.9.1/gems/rack-1.4.1/lib/rack/handler/webrick.rb:10:in new' from /home/roelof/.gem/ruby/1.9.1/gems/rack-1.4.1/lib/rack/handler/webrick.rb:10:in run’ from /home/roelof/.gem/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:265:in start' from /home/roelof/.gem/ruby/1.9.1/gems/railties-3.2.8/lib/rails/commands/server.rb:70:in start’ from /home/roelof/.gem/ruby/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:55:in block in <top (required)>' from /home/roelof/.gem/ruby/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:50:in tap’ from /home/roelof/.gem/ruby/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:50:in <top (required)>' from script/rails:6:in require’ from script/rails:6:in `’

How to solve this ?


The port (I guess) is already in use, maybe you’ve started rails before as a daemon or you have started it in another terminal.

If you want to start 2 or more development servers in the same machine then use

rails s -p PORT_NUMBER

As default rails uses 3000, you can use 3001 for example.

Javier Q

That means you've got a Rails server (or something else using the same port) already running. You need to track that down and stop it before you can do anything else with that address and port. (If you're not already comfy with Unix, the main commands you need to look at are ps and kill.)



I can now move forward on my project