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-native Hello %{name}.
  • Replaces Kernel#returning with Object#tap which is native to Ruby 1.8.7.
  • Renames Array#random_element to Array#sample which is native to Ruby 1.9.
  • Renames config.load_paths and .load_once_paths to the more accurate config.autoload_paths and .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!

Posted in Releases | 30 comments

Comments

  1. AG on 04 Sep 22:35:

    Cool!

  2. spat on 04 Sep 22:45:

    Good!

  3. Sven on 05 Sep 03:14:

    Excellent, and very helpful, thanks!

  4. Steve Purcell on 05 Sep 09:08:

    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.

  5. Jon Atack on 05 Sep 10:20:

    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…

  6. dimianstudio on 05 Sep 12:02:

    Thanks!!

  7. Karim on 05 Sep 15:02:

    Whatever makes the migration to Rails 3 easier is a good thing! Thanks!

  8. Patrik Wenger on 05 Sep 18:13:

    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.

  9. mikhailov on 06 Sep 05:20:

    thanks for the easy migration way from 2.x to 3.x

  10. slimey on 06 Sep 11:08:

    @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.

  11. Michael on 06 Sep 12:14:

    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 {} \;

  12. m3talsmith on 06 Sep 18:03:

    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

  13. Dmitry on 06 Sep 18:19:

    Still waiting for 2.3.10 till all the known bugs will be fixed. (sitting on 2.3.5)

  14. S on 06 Sep 22:26:

    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

  15. Max on 06 Sep 22:29:

    An information, what’s the url of the Rails 2.3.x api? Now http://api.rubyonrails.org/ points to Rails 3). TIA

  16. Jeffrey on 07 Sep 10:26:

    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.

  17. Joost Baaij on 07 Sep 18:59:

    @Max: you can use http://railsapi.com/doc/rails-v2.3.8/

  18. Trey on 08 Sep 01:43:

    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

  19. Michael on 08 Sep 08:07:

    Trey: I 2nd that. And i don’t want to monkey patch it, i want Rails / Rack not to mess with parameters.

  20. Robbie on 08 Sep 15:27:

    Awesome! This should tide me over until my shared host matures their support for Ruby 1.9/Rails 3.

    Thanks Rails Team

  21. Sohan on 08 Sep 15:53:

    Your post has been linked at the Drink Rails blog as one of the useful Ruby on Rails blog posts of the day.

  22. Mike on 09 Sep 12:55:

    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.

  23. Jens on 10 Sep 20:57:

    @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

  24. Jeff on 11 Sep 23:44:

    @Jens and @Jeffrey: There’s a patch for the session_store bug: http://gist.github.com/570149

  25. Ann on 13 Sep 08:58:

    Thanks for info!

  26. Titus Barik on 17 Sep 01:41:

    Why does the main Rails homepage still say that the latest version is 2.3.8?

  27. Michael on 17 Sep 12:03:

    Titus: Because the Rails team doesn’t seem to be interested in Rails 2.3.x anymore :((

  28. Thomas on 20 Sep 08:54:

    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.

  29. Matt A. on 22 Sep 18:55:

    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.

  30. tschundeee on 26 Sep 00:57:

    damn! fix that session bug! this is embarassing!