Fixing Multipart Uploads in Rack for Ruby 1.9
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
- Rails Ticket #2497: Rack in Rails 2.3.2 throws fatal error with small uploads
- Rack commit log: Fix multipart uploads on 1.9
- Ruby NYC: paperclip triggering a “invalid byte sequence in US-ASCII” ruby 1.9 rails 2.3
More of my rantings
- Ruby on Rails Testing – flash.now gotcha
- Rails link_to and HTML options
- Quick Tip: Rails Singularization of -ess
These might also interest you
- PNG problem for IE – SOLVED?! (Brainfuel)
- Coolest flash intro that I’ve seen in a while (Brainfuel)
- MarKamp: Marketing for Web Apps (Brainfuel)







