Forum: Ruby on Rails WEBrick initialisation error

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
28ca850f75008d8790514a65477cbf72?d=identicon&s=25 Brian Watson (Guest)
on 2006-05-03 10:34
I am new to Ruby so I thought the best way to get into it would be to
follow the ONLamp "Rolling with Ruby on Rails" intro. I followed the
instructions to the letter and everything work just great, very
impressive:-).

A couple of days later when I went back to it I got the following
message when trying to start the WEBrick server.

U:\RoRProjects\cookbook>ruby script\server
=> Booting WEBrick...
=> Rails application started on http://0.0.0.0:3000
=> Ctrl-C to shutdown server; call with --help for options
[2006-05-03 08:52:40] INFO  WEBrick 1.3.1
[2006-05-03 08:52:40] INFO  ruby 1.8.4 (2005-12-24) [i386-mswin32]
[2006-05-03 08:52:40] WARN  TCPServer Error: Bad file descriptor -
bind(2)
u:/ruby/lib/ruby/1.8/webrick/utils.rb:73:in `initialize': Bad file
descriptor -
bind(2) (Errno::EBADF)
        from u:/ruby/lib/ruby/1.8/webrick/utils.rb:73:in
`create_listeners'
        from u:/ruby/lib/ruby/1.8/webrick/utils.rb:70:in
`create_listeners'
        from u:/ruby/lib/ruby/1.8/webrick/server.rb:75:in `listen'
        from u:/ruby/lib/ruby/1.8/webrick/server.rb:63:in `initialize'
        from u:/ruby/lib/ruby/1.8/webrick/httpserver.rb:24:in
`initialize'
        from
u:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:59
:in `dispatch'
        from
u:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/servers/web
rick.rb:59
        from
u:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `re
quire'
        from
u:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_suppo
rt/dependencies.rb:147:in `require'
        from
u:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/server.rb:3
0
        from
u:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `re
quire'
        from
u:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_suppo
rt/dependencies.rb:147:in `require'
        from script/server:3

U:\RoRProjects\cookbook>

I have tried totally uninstalling (ruby, rails, MySQL) and then
reinstalling but with no success. Obviously something has changed in the
environment that it is running in but I cannot recall anything that has
been done that would be of significance. Any ideas what could cause
this?

Any assistance would be gratefully received.

Regards

Brian Watson
C29d9db03853958c4de5ee6b06edd39a?d=identicon&s=25 Nicolas Buet (Guest)
on 2006-05-03 19:06
(Received via mailing list)
what happens if you create a new rails project (empty)?
E28c35323f624b8b9ed8712e25105454?d=identicon&s=25 Ray Baxter (Guest)
on 2006-05-03 19:26
(Received via mailing list)
Somehow you still have the original instance of webrick running and
blocking read access to port 3000. Try script/server -p 3001 if you
can't figure out how to kill the running instance.

--

Ray
This topic is locked and can not be replied to.