brynary/rack-bug

Ruby 1.9.1 issue

Opened this issue · 3 comments

In ruby 1.9 rack-bug raises exception:

/!\ FAILSAFE /!\  2009-05-31 04:34:24 +0400
  Status: 500 Internal Server Error
  incompatible character encodings: UTF-8 and US-ASCII
    vendor/plugins/rack-bug/lib/rack/bug/toolbar.rb:136:in `sub!'
    vendor/plugins/rack-bug/lib/rack/bug/toolbar.rb:136:in `inject_toolbar'
    vendor/plugins/rack-bug/lib/rack/bug/toolbar.rb:79:in `dispatch'
    vendor/plugins/rack-bug/lib/rack/bug/toolbar.rb:57:in `call'

# debug output:
# full_body.encoding == UTF-8
# render.encoding == US-ASCII

Patch: antage@f73f719b92a7b070b55664895dff1a104da70985

Antage, your patch link no longer works. Could you possibly repost it, or point to a repository which has it applied?

Thanks, that fixes this bug. This one follows. I guess I'll try one of the many forked projects.

/!\ FAILSAFE /!\  2010-04-02 15:29:23 +0100
  Status: 500 Internal Server Error
  You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.+
    /Users/noodl/Projects/footi/vendor/plugins/rack-bug/lib/rack/bug/toolbar.rb:125:in `inject_toolbar'