Fixing Multipart Uploads in Rack for Ruby 1.9

Patch your Rack installation after seeing an 'invalid byte sequence in US-ASCII' error.

Posted by Curtis Miller Curtis Miller

There is a slight problem in Rack 1.0.0 that causes a fatal error to be produced when uploading files <= 110K in size. You may need to patch Rack if you see the following error when uploading a file (I saw it with Paperclip):

Here's what you do to patch Rack:

You should now be back in business. Hopefully it won't be too long before an update is released for Rack that includes the patch.

Happy uploading!

References



Velocity Labs

Need web application development, maintenance for your existing app, or a third party code review?

Velocity Labs can help.

Hire us!