on:
$ sudo webrick_test.rb
where webrick_test.rb reads:
#!/usr/local/bin/ruby
require 'webrick'
PORT = 8809
DOCUMENT_ROOT = Dir.pwd
s = WEBrick::HTTPServer.new :port => PORT, :DocumentRoot =>
DOCUMENT_ROOT
trap('INT') { s.shutdown }
s.start
no matter what port i use i get this:
[2006-05-24 18:07:16] INFO WEBrick 1.3.1
[2006-05-24 18:07:16] INFO ruby 1.8.4 (2005-12-24) [i686-linux]
[2006-05-24 18:07:16] WARN TCPServer Error: Address already in use -
bind(2)
[2006-05-24 18:07:16] WARN TCPServer Error: Address already in use -
bind(2)
/usr/local/lib/ruby/1.8/webrick/utils.rb:73:in `initialize': Address
already in use - bind(2) (Errno::EADDRINUSE)
from /usr/local/lib/ruby/1.8/webrick/utils.rb:73:in `create_listeners'
from /usr/local/lib/ruby/1.8/webrick/utils.rb:70:in `create_listeners'
from /usr/local/lib/ruby/1.8/webrick/server.rb:75:in `listen'
from /usr/local/lib/ruby/1.8/webrick/server.rb:63:in `initialize'
from /usr/local/lib/ruby/1.8/webrick/httpserver.rb:24:in `initialize'
from ./webrick_test.rb:8
running ruby 1.8.4 on Linux Ubuntu Breazy
all suggestions appreciated,
_c
···
--
Posted via http://www.ruby-forum.com/.