How do I upgrade rack in my current rails app?

Hi,

I have a rails 2.3.8 app which has rack 1.1.0. I get parse_multipart error. There's a new release of rack 1.2.0 which might fix the multipart error.

The question is how I upgrade the rack? I froze the rails. I did "gem update rack" and it upgraded rack to 1.2.0. But my rails app still uses rack 1.1. How do I set the rails app use rack 1.2.0?

Thanks.

Sam

Hi,

I have a rails 2.3.8 app which has rack 1.1.0. I get parse_multipart error. There's a new release of rack 1.2.0 which might fix the multipart error.

The question is how I upgrade the rack? I froze the rails. I did "gem update rack" and it upgraded rack to 1.2.0. But my rails app still uses rack 1.1. How do I set the rails app use rack 1.2.0?

Rails 2.3.x is hardcoded to require rack 1.1.x. You could try changing that ( in actionpack/lib/action_controller.rb) although no guarantee that it will work, if 1.2 has breaking api changes compared to 1.1

Fred

Sam Kong wrote:

I have a rails 2.3.8 app which has rack 1.1.0. I get parse_multipart error. There's a new release of rack 1.2.0 which might fix the multipart error.

The question is how I upgrade the rack? I froze the rails. I did "gem update rack" and it upgraded rack to 1.2.0. But my rails app still uses rack 1.1. How do I set the rails app use rack 1.2.0?

Sorry, I don't know exactly how to resolve your issue, but I can tell you this much. Rails version 2.3.5 used a version of Rack prior to 1.1.0 (I don't remember the exact version). Rails used that version even when a newer Rack gem was installed. Apparently its dependency is restricted it to use the older version only.

Maybe Rails 2.3.8 is doing something similar for Rack 1.1.0.

What indication do you have that upgrading to Rack 1.2.0 will solve your problem? Did you read that somewhere, or are you just guessing? If the latter then you're probably wasting your time. If Rails 2.3.8 were having issues with the version of Rack installed, then it seems likely that a lot of people would be having the same problem.

I've not actually been able to try Rails 2.3.8, because I can't install it on one of my machines for some reason. I haven't figured out why. And, with Rails 3.0 so close to release I may skip 2.3.8 altogether. It seems like it still has some issues anyway.

Robert Walker wrote:

Sam Kong wrote:

I have a rails 2.3.8 app which has rack 1.1.0. I get parse_multipart error. There's a new release of rack 1.2.0 which might fix the multipart error.

The question is how I upgrade the rack? I froze the rails. I did "gem update rack" and it upgraded rack to 1.2.0. But my rails app still uses rack 1.1. How do I set the rails app use rack 1.2.0?

Sorry, I don't know exactly how to resolve your issue, but I can tell you this much. Rails version 2.3.5 used a version of Rack prior to 1.1.0 (I don't remember the exact version). Rails used that version even when a newer Rack gem was installed. Apparently its dependency is restricted it to use the older version only.

Maybe Rails 2.3.8 is doing something similar for Rack 1.1.0.

What indication do you have that upgrading to Rack 1.2.0 will solve your problem? Did you read that somewhere, or are you just guessing? If the latter then you're probably wasting your time. If Rails 2.3.8 were having issues with the version of Rack installed, then it seems likely that a lot of people would be having the same problem.

I've not actually been able to try Rails 2.3.8, because I can't install it on one of my machines for some reason. I haven't figured out why. And, with Rails 3.0 so close to release I may skip 2.3.8 altogether. It seems like it still has some issues anyway.

Hi Robert,

According to the release note, 1.2.0 has "Various multipart fixes"

June 13th, 2010: Tenth public release 1.2.0.   * Removed Camping adapter: Camping 2.0 supports Rack as-is   * Removed parsing of quoted values   * Add Request.trace? and Request.options?   * Add mime-type for .webm and .htc   * Fix HTTP_X_FORWARDED_FOR   * Various multipart fixes   * Switch test suite to bacon

Thank you for your reply.

Sam