File Uploads with Rack 1.0 and Ruby 1.9.1

21 August 2009 by Bret

In our rails application we have a file upload feature. Worked great, until we moved development to Ruby 1.9.1. In Ruby 1.9.1 with Rack 1.0 we ended up with this wonderful little message.

Status: 500 Internal Server Error invalid byte sequence in US-ASCII

Looking at the github source code for Rack we noticed that offending file had been updated, but not pushed out to the 1.0 version of the gem. Why? We’re not entirely sure. The solution was to clone the repo on github into a src directory.

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

Then copy the /lib/rack/utils.rb into the 1.0 gem. Restart the server and there we go, uploads resume their uploading goodness.

Bookmark and Share

Tags:

This entry was posted on Friday, August 21st, 2009 at 2:13 pm and is filed under Updates. You can follow any responses to this entry through the RSS feed. Both comments and pings are currently closed.

Comments are closed.