1.5.1 webrick w/rack on Win7 error

Can anyone replicate the following webrick error using the following
simple.ru file?

I’ve only tested on Win7 32-bit Ultimate and I’m only seeing the failure
when I explicitly try to set the listening port. As expected, updating
to RubyGems v1.3.7 had no effect.

Jon

simple.ru

use Rack::CommonLogger

map ‘/’ do
run Proc.new {|env| [ 200, {‘Content-Type’ => ‘text/plain’},
[env.inspect] ]}
end

map ‘/version’ do
map ‘/’ do
run Proc.new {|env| [ 200, {‘Content-Type’ => ‘text/plain’},
[‘Simple 0.1’] ]}
end

map ‘/last’ do
run Proc.new {|env| [ 200, {‘Content-Type’ => ‘text/plain’}, [‘Simple
beta 0.0’] ]}
end

map ‘/new’ do
run Proc.new {|env| [ 200, {‘Content-Type’ => ‘text/plain’},
[‘Simple beta 0.2’] ]}
end
end

=== FAILING CASE ===

C:\Users\Jon\Documents\RubyDev\sandbox>jruby -S rackup -p 8080 simple.ru
[2010-06-08 09:51:50] INFO WEBrick 1.3.1
[2010-06-08 09:51:50] INFO ruby 1.8.7 (2010-06-06) [java]
c:/jruby/lib/ruby/1.8/webrick/utils.rb:63:in create_listeners': no such service 8080/tcp (SocketError) from c:/jruby/lib/ruby/1.8/webrick/server.rb:75:in listen’
from c:/jruby/lib/ruby/1.8/webrick/server.rb:63:in initialize' from c:/jruby/lib/ruby/1.8/webrick/httpserver.rb:24:in initialize’
from
c:/jruby/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/webrick.rb:10:in
new' from c:/jruby/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/webrick.rb:10:in run’
from
c:/jruby/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/server.rb:155:in
start' from c:/jruby/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/server.rb:83:in start’
from C:/jruby/lib/ruby/gems/1.8/gems/rack-1.1.0/bin/rackup:4
from C:/jruby/lib/ruby/gems/1.8/gems/rack-1.1.0/bin/rackup:19:in
`load’
from c:/jruby/bin/rackup:19

=== WORKING CASE ===

C:\Users\Jon\Documents\RubyDev\sandbox>jruby -S rackup simple.ru
[2010-06-08 09:57:32] INFO WEBrick 1.3.1
[2010-06-08 09:57:32] INFO ruby 1.8.7 (2010-06-06) [java]
[2010-06-08 09:57:32] INFO WEBrick::HTTPServer#start: pid=1456
port=9292
127.0.0.1 - - [08/Jun/2010 09:57:48] “GET / HTTP/1.1” 200 - 0.0000
127.0.0.1 - - [08/Jun/2010 09:57:48] “GET / HTTP/1.1” 200 - 0.0070

=== JRUBY GEM ENV ===

C:\Users\Jon\Documents\RubyDev\sandbox>jruby -S gem env
RubyGems Environment:

  • RUBYGEMS VERSION: 1.3.6
  • RUBY VERSION: 1.8.7 (2010-06-06 patchlevel 249) [java]
  • INSTALLATION DIRECTORY: c:/jruby/lib/ruby/gems/1.8
  • RUBY EXECUTABLE: c:/jruby/bin/jruby.exe
  • EXECUTABLE DIRECTORY: c:/jruby/bin
  • RUBYGEMS PLATFORMS:
    • ruby
    • universal-java-1.6
  • GEM PATHS:
    • c:/jruby/lib/ruby/gems/1.8
  • GEM CONFIGURATION:
    • :update_sources => true
    • :verbose => true
    • :benchmark => false
    • :backtrace => false
    • :bulk_threshold => 1000
    • “install” => “–env-shebang”
    • “update” => “–env-shebang”
    • :sources => [“http://rubygems.org”, “http://gemcutter.org”]
    • “gem” => “–no-ri --no-rdoc”
  • REMOTE SOURCES:

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Hi Jon,

Yes, this is easily reproducible on Win7 and linux. I’ve filed the
following bug report for this:

http://jira.codehaus.org/browse/JRUBY-4868

Thanks,
–Vladimir

On Tue, Jun 8, 2010 at 4:02 PM, Jon [email protected] wrote:

map ‘/’ do
end
[2010-06-08 09:51:50] INFO WEBrick 1.3.1
from C:/jruby/lib/ruby/gems/1.8/gems/rack-1.1.0/bin/rackup:19:in `load’
127.0.0.1 - - [08/Jun/2010 09:57:48] “GET / HTTP/1.1” 200 - 0.0070


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Oh, and it has just been fixed as well :slight_smile:

Thanks,
–Vladimri

On Sat, Jun 12, 2010 at 3:32 PM, Vladimir S. [email protected]
wrote:

On Tue, Jun 8, 2010 at 4:02 PM, Jon [email protected] wrote:

map ‘/’ do
end
[2010-06-08 09:51:50] INFO WEBrick 1.3.1
from C:/jruby/lib/ruby/gems/1.8/gems/rack-1.1.0/bin/rackup:19:in `load’
127.0.0.1 - - [08/Jun/2010 09:57:48] “GET / HTTP/1.1” 200 - 0.0070


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email