thin 1.2.4 + rack 1.0.1 + Ruby 1.9.1

28 views
Skip to first unread message

cult hero

unread,
Oct 23, 2009, 8:04:42 PM10/23/09
to Ramaze
I'm not sure how recently (since I've spent so much time in the
console playing with the models on their own... like a month's worth
of time) these changes have happened, but...

When I use thin as my server while testing I get this error:

rack.input #<StringIO:0x000001021eb4d0> does not have ASCII-8BIT as
its external encoding

Any idea what's up?

Michael Fellinger

unread,
Oct 23, 2009, 11:50:49 PM10/23/09
to ram...@googlegroups.com
Your locale is wrong.
Put the following line somewhere before Ramaze.start:
Encoding.default_external = Encoding::UTF_8

> >
>



--
Michael Fellinger
CTO, The Rubyists, LLC
972-996-5199

cult hero

unread,
Oct 24, 2009, 1:32:28 PM10/24/09
to Ramaze
I'm obviously pretty ignorant of how all this goes together but...

I tried putting "Encoding.default_external = Encoding::UTF_8" in:

app.rb
start.rb
config.ru

Same problem every time. (I'm running "ramaze start -s thin" to kick
the app on if that helps.)

On Oct 23, 8:50 pm, Michael Fellinger <m.fellin...@gmail.com> wrote:

Lin Jen-Shin

unread,
Oct 27, 2009, 6:07:18 AM10/27/09
to Ramaze, godfat 真常
I've encountered this as well just a moment before.
I'm not sure what's going on, but whenever I put
this on the beginning:

Encoding.default_external = Encoding::ASCII_8BIT

It goes fine.
I would guess it's a Rack/Thin combo problem.
WEBrick and Unicorn are both fine without the line.

Here's my environment:
ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-darwin10]
ramaze 2009.07
rack 1.0.1
thin 1.2.4
unicorn 0.93.3

cheers,

Michael Fellinger

unread,
Oct 27, 2009, 7:15:09 AM10/27/09
to ram...@googlegroups.com
On Tue, Oct 27, 2009 at 7:07 PM, Lin Jen-Shin <god...@gmail.com> wrote:
>
> On Oct 24, 8:04 am, cult hero <binarypala...@gmail.com> wrote:
>> I'm not sure how recently (since I've spent so much time in the
>> console playing with the models on their own... like a month's worth
>> of time) these changes have happened, but...
>>
>> When I use thin as my server while testing I get this error:
>>
>> rack.input #<StringIO:0x000001021eb4d0> does not have ASCII-8BIT as
>> its external encoding
>>
>> Any idea what's up?
>
> I've encountered this as well just a moment before.
> I'm not sure what's going on, but whenever I put
> this on the beginning:
>
>  Encoding.default_external = Encoding::ASCII_8BIT
>
> It goes fine.
> I would guess it's a Rack/Thin combo problem.
> WEBrick and Unicorn are both fine without the line.

I've told raggi about the issue and he pushed a patch for it to the repository:
http://github.com/raggi/thin/commit/417fa930ab2413a9c3a37013340c85a2d519dccb

> Here's my environment:
> ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-darwin10]
> ramaze 2009.07
> rack 1.0.1
> thin 1.2.4
> unicorn 0.93.3
>
> cheers,

--

Reply all
Reply to author
Forward
0 new messages