Skip to content
accelerando

Preparing for Rails 2.3.9

As much as i wish to upgrade my Rails 2.3.x application Daily Fratze to the newest tag of the Rails 2.3.x branch, i cannot.

First there was the epic fail of release 2.3.6, that broke all HTML Helpers and forced the Rails XSS protection upon us. This release was immediately followed by 2.3.7 and 2.3.8. With my tests, this version was still enforcing Rails XSS and breaking helpers like “h”.

Rails 2.3.9, released last week, puts en end to this.

I just was about to upgrade, when i read this error: Textarea input silently truncated in 2.3.8!. The input of a textarea is truncated if the text entered consists of two lines or more with one of them quoted as the Rack middleware messes with the input.

I can confirm that this behavior still applies to 2.3.9.

It’s a shame, that all the talk is about Rails 3 with bugs like this in an older branch. I understand that this is a Rack problem but as it is already fixed in newer Rack versions, i cannot understand that the Rails team doesn’t bump the required Rack version respectively has no tests for problems like these.

So i’m hoping that Rails 2.3.10 sees the light of day anytime soon.

Anyway, as Rails 2.3.9 suddenly uses a new interpolation syntax for the translation files (“Hello {{name}}” becomes ” Hello %{name}”), here is a one-liner to update i18n files to the new syntax:

find . -iname "*.yml" -exec sed 's/{{\([^\{\}]*\)}}/%{\1}/g' -i {} \;

If you like some less escapism use xargs

find . -iname "*.yml"  | xargs sed 's/{{\([^{}]*\)}}/%{\1}/g' -i;

Commands need to be executed inside your locale directory.

2 Comments

  1. Brent wrote:

    I’m totally with you, they need to release Rails 2.3.10 soon. I had the same problem with HTML helpers when upgrading to 2.3.8. I tried 2.3.9, but in addition to the textare bug that you describe, another critical bug in 2.3.9 is that the ActiveRecord session store doesn’t work. Having 4 releases after 2.3.5 that all have critical bugs isn’t giving me a good feeling for the stability of Rails 3.

    Posted on 09-Sep-10 at 1:07 am | Permalink
  2. Jimmy Soho wrote:

    Totally agree! We’re still hanging out on rails 2.3.5, with each new release we tried migrating to we got big unacceptable fails. Hopefully rails 2.3.10 … but it’s getting harder now with each new release unfortunately, so I’m not very hopeful unfortunately.

    Posted on 07-Oct-10 at 7:32 am | Permalink

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*

*

Close
E-mail It