paperclip triggering a “invalid byte sequence in US-ASCII” ruby 1.9 rails 2.3

hmmm, I was braking my head for a very long time, almost rolling to 1.8.7 but found a fix thanks to andi

here’s the problem description and the patch:

Rack in Rails 2.3.2 throws fatal error with small uploads

binary multipart uploads causing Rack with Rails 2.3.2 to throw a fatal error.

files that >= 112kb works, <= 110k fails. The error thrown up from Rack is:

/!\ FAILSAFE /!\ 2009-04-14 17:23:32 -0400 Status: 500 Internal Server Error invalid byte sequence in US-ASCII

This specific exception is coming from Rails’ bundled rack-1.0 package

What to do:

first remove the rack gem and its dependencies

clone it:
git clone git://github.com/rack/rack.git

build it:
sudo rake gem VERSION=1.0.0

install it:
sudo gem install rack-1.0.gem

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: