Forum: Ruby on Rails start project again with a empty database

Posted by Roelof Wobben (roelof)
on 2012-10-10 18:06
(Received via mailing list)
Hello,

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 `<main>'


How to solve this ?

Roelof
Posted by Javier Quarite (Guest)
on 2012-10-10 18:14
(Received via mailing list)
On Wed, Oct 10, 2012 at 11:05 AM, roelof <rwobben@hotmail.com> wrote:

>
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
Posted by Dave Aronson (Guest)
on 2012-10-10 18:16
(Received via mailing list)
On Wed, Oct 10, 2012 at 12:05 PM, roelof <rwobben@hotmail.com> wrote:

> WARN  TCPServer Error: Address already in use - bind(2)

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.)

-Dave

--
Dave Aronson, T. Rex of Codosaurus, LLC... aka
Available Secret-Cleared Ruby/Rails Freelancer
(NoVa/DC/Remote); see http://www.Codosaur.us/.
Posted by Roelof Wobben (roelof)
on 2012-10-10 19:26
(Received via mailing list)
Thanks,

I can now move forward on my project

Roelof

Op woensdag 10 oktober 2012 18:15:39 UTC+2 schreef Dave Aronson het
volgende:
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.