Chris Mentch wrote:
>>>
>>> Well, I executed "gem install mongrel", then "ruby script/server
>>> webrick" and everything is loading!!
>> 
>> I presume you mean "ruby script/server mongrel"
>> 
>> Colin
> 
> 
> Yes... Sorry. Webrick still on the mind.
> 
> ruby script/server mongrel
> 
> Works!

To continue using Webrick, instead of switching to Mongrel, you can also 
just edit line 15 of lib/ruby/1.8/webrick/htmlutils.rb to read

      str = string ? string.to_s.dup : ""

The problem is that NotModified exception is getting passed to 
HTMLUtils::escape as a class, rather than a string (originally raised in 
HTTPServlet::DefaultFileHandler). Since the only things that can really 
be HTML escaped are strings, it should be safe to always convert the 
input to string.

I suspect that the potential performance penalty may prevent a solution 
like that from making it to the standard ruby library, but it's a simple 
workaround.

Alternatively, in the handle_file method of webrick's DispatchServlet 
(lib/webrick_server.rb in the rails gem), before it calls res.set_error 
with the exception, you could force the err.message to be a string, or 
even clear the message, since I think it's discarded anyway for 
NotModified.

Michael
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to