Ruby on Rails 2.3.9 Released
Posted by Jeremy Kemper September 04, 2010 @ 09:45 PM
We’ve released Ruby on Rails 2.3.9 (gem and git tag) to extend the 2.3.8 bridge a few steps closer to Rails 3 and Ruby 1.9. If your app runs on Rails 2.3.9 without deprecation warnings, you’re looking good for an upgrade to Rails 3.
Deprecations
- Changes i18n named-interpolation syntax from the deprecated
Hello {{name}}to the 1.9-nativeHello %{name}. - Replaces
Kernel#returningwithObject#tapwhich is native to Ruby 1.8.7. - Renames
Array#random_elementtoArray#samplewhich is native to Ruby 1.9. - Renames
config.load_pathsand.load_once_pathsto the more accurateconfig.autoload_pathsand.autoload_once_paths.
Along with these deprecations come a broad array of bugfixes and minor tweaks. Read the commit log for the full story.
Onward to 3.1!

Cool!
Good!
Excellent, and very helpful, thanks!
But look out for submitted form data disappearing silently, since this release of Rails still uses a buggy version of Rack:
https://rails.lighthouseapp.com/projects/8994/tickets/4808-textarea-input-silently-truncated-in-238
I’ll be sticking with 2.3.5 for my apps until I’m ready to tackle the 3.0 upgrades.
Thanks for the warning, Steve. I tried to reproduce the reported bug in my app and couldn’t; it’s working well so far.
In fact, this is the first update since 2.3.5 where the nested attributes are working properly for me. It’s good to finally upgrade and have everything work right off the bat.
On the road to Rails 3 now…
Thanks!!
Whatever makes the migration to Rails 3 easier is a good thing! Thanks!
What do you mean by “the 1.9-native Hello %{name}”? How to use that functionality of Ruby 1.9? Where is it documented? Thanks in advance.
thanks for the easy migration way from 2.x to 3.x
@Patrik: This is the new string interpolation syntax:
old “hello %s” % “Patrik” #=> “hello Patrik”
new “hello %{person}” % {:person => “Patrik”} #=> “hello Patrik”
It should be documented in String::%—but http://ruby-doc.org/ruby-1.9/classes/String.html#M000565 still has the old syntax.
I suppose the Rails change refers to I18n translation strings.
Steve: The bug still applies. What a shame.
Regarding the new string interpolation syntax, you can update all i18n yaml files like so:
find . -iname “de.yml” -exec sed ’s/{{\([^\{\}]*\)}}/%{\1}/g’ -i {} \;
A depreciation warning with a bad description:
config.load_paths is deprecated and removed in Rails 3, please use autoload_paths instead
When I move to use autoload_paths the method doesn’t exist. But use config.autoload_paths and all is well with the world. Just a clarification issue that might make it easier for newer rails users getting ready to move to rails 3.
I changed it here: http://github.com/rebelhold/rails/commit/a37d07dd4eb9e7efff90172a51f72ba68969a63a
Still waiting for 2.3.10 till all the known bugs will be fixed. (sitting on 2.3.5)
Also, It’s nice to see that 2.3.9 generates bad sql when doing simular :include or :join with named scopes where as previous versions didn’t:
https://rails.lighthouseapp.com/projects/8994/tickets/5524-not-unique-tablealiasambiguous-column-name-with-chained-named_scopes#ticket-5524-1
An information, what’s the url of the Rails 2.3.x api? Now http://api.rubyonrails.org/ points to Rails 3). TIA
ActiveRecord::SessionStore does not seem to work for me after upgrading from 2.3.8 to 2.3.9 The cookie with the _session_id is no longer set on the local machine, which causes new sessions to be created with each request.
@Max: you can use http://railsapi.com/doc/rails-v2.3.8/
Any chance to get a 2.3.10 with the Rack quote bug fixed? It’s quite destructive and the fix has been sitting there for a very long time.
http://thewebfellas.com/blog/2010/7/15/rails-2-3-8-rack-1-1-and-the-curious-case-of-the-missing-quotes
Trey: I 2nd that. And i don’t want to monkey patch it, i want Rails / Rack not to mess with parameters.
Awesome! This should tide me over until my shared host matures their support for Ruby 1.9/Rails 3.
Thanks Rails Team
Your post has been linked at the Drink Rails blog as one of the useful Ruby on Rails blog posts of the day.
I third the call for a Rack fix!!
Any rails above 2.3.5 is unusable because of its dependency on Rack 1.1.0.
I was really hoping for this to be fixed in 2.3.9, considering that its been known since early 2010 that Rack 1.1.0 is broken, and there has been a monkey patch available for months now. Alas it was not.
Seems like a pretty massive failing to silently truncate text from POST parameters. It would even break the standard Rails “hello world” blog application.
@Jeffrey I have the same problem after upgrading from 2.3.2 to 2.3.9. Session parameters are all nil. session_store = :active_record_store doesn’t work for me w/ Rails 2.3.9 anymore
@Jens and @Jeffrey: There’s a patch for the session_store bug: http://gist.github.com/570149
Thanks for info!
Why does the main Rails homepage still say that the latest version is 2.3.8?
Titus: Because the Rails team doesn’t seem to be interested in Rails 2.3.x anymore :((
I too switched back to rails 2.3.5, which is the latest rails version from the 2.3-series which ever worked for me.
I think, I will go to rails 3 soon, to avoid those problems.
This should have been drop and forget release for 2.3.x applications, but breaking something like the session_store as mentioned above is a big deal for us. We really appreciate all the effort that is going into rails3 but we are anxiously waiting a rock solid 2.3 release for few of our legacy apps.
damn! fix that session bug! this is embarassing!