Hm, I'm glad to know it's something I'm doing wrong. Well, kind of!
The Ruby I'm using is straight from trunk, 06-06-2008, rev 16866. On a
fresh clone of Rack from
http://github.com/chneukirchen/rack/tree/master
I'm simply going to the Rack directory and executing
ruby9 -Ilib lib/rack/lobster.rb (ruby9 is an alias to my Ruby 1.9
install)
It looks like it's working fine:
2008-06-07 21:49:22] INFO WEBrick 1.3.1
[2008-06-07 21:49:22] INFO ruby 1.9.0 (2008-06-06) [i686-darwin9.3.0]
[2008-06-07 21:49:22] INFO WEBrick::HTTPServer#start: pid=24904
port=9292
But then as soon as I try to load, boom. I've pasted the output after
this mail.
The output in the browser is:
Internal Server Error
undefined method `each' for "text/html":String
WEBrick/1.3.1 (Ruby/1.9.0/2008-06-06) at
0.0.0.0:9292
I've tried other things too, but this is the simplest one. And it
works perfectly in 1.8.6. Any ideas? I am probably doing something
really dumb...
Thanks for your help,
Sho
(Error output)
Rack::Lint::LintError: header values must respond to #each
/Users/sho/projects/sources/rack/lib/rack/lint.rb:16:in `assert'
/Users/sho/projects/sources/rack/lib/rack/lint.rb:328:in `block in
check_headers'
/Users/sho/projects/sources/rack/lib/rack/lint.rb:312:in `each'
/Users/sho/projects/sources/rack/lib/rack/lint.rb:312:in
`check_headers'
/Users/sho/projects/sources/rack/lib/rack/lint.rb:45:in `call'
/Users/sho/projects/sources/rack/lib/rack/showexceptions.rb:23:in
`call'
/Users/sho/projects/sources/rack/lib/rack/handler/webrick.rb:40:in
`service'
/usr/local/ruby1.9/lib/ruby/1.9.0/webrick/httpserver.rb:111:in
`service'
/usr/local/ruby1.9/lib/ruby/1.9.0/webrick/httpserver.rb:70:in `run'
/usr/local/ruby1.9/lib/ruby/1.9.0/webrick/server.rb:175:in `block in
start_thread'
[2008-06-07 21:51:17] ERROR NoMethodError: undefined method `each' for
"text/html":String
/Users/sho/projects/sources/rack/lib/rack/handler/webrick.rb:44:in
`block in service'
/Users/sho/projects/sources/rack/lib/rack/handler/webrick.rb:43:in
`each'
/Users/sho/projects/sources/rack/lib/rack/handler/webrick.rb:43:in
`service'
/usr/local/ruby1.9/lib/ruby/1.9.0/webrick/httpserver.rb:111:in
`service'
/usr/local/ruby1.9/lib/ruby/1.9.0/webrick/httpserver.rb:70:in `run'
/usr/local/ruby1.9/lib/ruby/1.9.0/webrick/server.rb:175:in `block in
start_thread'
localhost - - [07/Jun/2008:21:51:17 EST] "GET / HTTP/1.1" 500 334
- -> /
Rack::Lint::LintError: header values must respond to #each
/Users/sho/projects/sources/rack/lib/rack/lint.rb:16:in `assert'
/Users/sho/projects/sources/rack/lib/rack/lint.rb:328:in `block in
check_headers'
/Users/sho/projects/sources/rack/lib/rack/lint.rb:312:in `each'
/Users/sho/projects/sources/rack/lib/rack/lint.rb:312:in
`check_headers'
/Users/sho/projects/sources/rack/lib/rack/lint.rb:45:in `call'
/Users/sho/projects/sources/rack/lib/rack/showexceptions.rb:23:in
`call'
/Users/sho/projects/sources/rack/lib/rack/handler/webrick.rb:40:in
`service'
/usr/local/ruby1.9/lib/ruby/1.9.0/webrick/httpserver.rb:111:in
`service'
/usr/local/ruby1.9/lib/ruby/1.9.0/webrick/httpserver.rb:70:in `run'
/usr/local/ruby1.9/lib/ruby/1.9.0/webrick/server.rb:175:in `block in
start_thread'
[2008-06-07 21:51:17] ERROR NoMethodError: undefined method `each' for
"text/html":String
/Users/sho/projects/sources/rack/lib/rack/handler/webrick.rb:44:in
`block in service'
/Users/sho/projects/sources/rack/lib/rack/handler/webrick.rb:43:in
`each'
/Users/sho/projects/sources/rack/lib/rack/handler/webrick.rb:43:in
`service'
/usr/local/ruby1.9/lib/ruby/1.9.0/webrick/httpserver.rb:111:in
`service'
/usr/local/ruby1.9/lib/ruby/1.9.0/webrick/httpserver.rb:70:in `run'
/usr/local/ruby1.9/lib/ruby/1.9.0/webrick/server.rb:175:in `block in
start_thread'
localhost - - [07/Jun/2008:21:51:17 EST] "GET /favicon.ico HTTP/1.1"
500 334
http://0.0.0.0:9292/ -> /favicon.ico
On Jun 7, 9:14 pm, "Michael Fellinger" <
m.fellin...@gmail.com> wrote: