Rails 2.3.2: not ready for prime time

Courtenay : May 9th, 2009

I’d strongly advise against upgrading your application to Rails 2.3.2. I’ve hit quite a few bugs that have taken a big chunk out of several of my days, including:

  • “can’t dup nilclass”, as reported here: http://groups.google.com/group/rubyonrails-core/msg/787b561d166abf53
  • A strange bug in associations and rspec, http://groups.google.com/group/rspec/browse_thread/thread/7901db1b123eb93c
  • Lots of upgrade issues with rspec requiring a rewrite of routing specs and erroneous missing templates (reported in their README)
  • Anything that isn’t fixtures, but creates records in tests, will fail due to the Rails new way of doing nested transactions

Stick to 2.2 for a while longer – it’s not worth your time.

18 Responses to “Rails 2.3.2: not ready for prime time”

  1. Russ Jones Says:

    How about making those links active?

  2. Luis Lavena Says:

    With that statement then we all will be using Rails 1.2...

    Without testing new versions for your application bugs couldn't never be found.

    This post could have been named "Unless needed, don't use Rails 2.3.2 in production, yet".

    If you had an application with extensive test suite, then testing your application against Rails 2.3.2 could be really helpful for Rails itself.

    Just my simple comment. (btw, I'm not human).

  3. Luigi Montanez Says:

    Another showstopper is the fact that the Rack binding in Rails 2.3 loads entire file uploads into memory (instead of just storing a reference to the file). This causes any app that processes uploads to leak memory like there's no tomorrow. Workaround here:

    http://bit.ly/d7xhR

  4. Jeremy Says:

    @Luis That's how we're rooting these bugs out. 2.3 is supposed to be production ready, but these are pretty weird and wild bugs, especially the transactions stuff.

    Then again, that's what RC's are for, and we'll be sure to make better use of those in the future.

  5. Hongli Lai Says:

    @Luigi Montanez: That's partially Phusion Passenger's fault. Upgrade to Phusion Passenger 2.2.2 and you should be fine.

  6. Tom Says:

    Plus named scopes are essentially broken in 2.3.2 (the :order and COUNT bugs). Nobody seems to care much about servicing these sorts of bugs on Lighthouse. I guess Rails 3 is just too hot to waste time on making the last release work.

  7. Yaroslav Says:

    @c3 I thought you said ENTP dumped RSpec, huh?

    @Tom :order bug is fixed in master.

  8. Jeremy Says:

    @yarislav We did but our older projects still use it. Porting 5,000 or so specs didn't seem like a prudent use of time :)

  9. Anko Painting Says:

    I have problems with 2.3.2 on ruby 1.9.1;

    ruby191 script/server /home/sysnjk/rails/lists/config/boot.rb:86:in load_rubygems': undefined method>=' for nil:NilClass (NoMethodError) from /home/sysnjk/rails/lists/config/boot.rb:52:in load_initializer' from /home/sysnjk/rails/lists/config/boot.rb:38:inrun' from /home/sysnjk/rails/lists/config/boot.rb:11:in boot!' from /home/sysnjk/rails/lists/config/boot.rb:109:in<top>' from script/server:2:in require' from script/server:2:in<main>'

    if anyone has any ideas, they'd be appreciated :)

  10. Anko Painting Says:

    posting again with (hopefully) proper formatting.

    I have problems with 2.3.2 on ruby 1.9.1;

    ruby191 script/server
    /home/sysnjk/rails/lists/config/boot.rb:86:in  `load_rubygems': undefined method `>=' for nil:NilClass (NoMethodError)
            from /home/sysnjk/rails/lists/config/boot.rb:52:in `load_initializer'
            from /home/sysnjk/rails/lists/config/boot.rb:38:in `run'
            from /home/sysnjk/rails/lists/config/boot.rb:11:in `boot!'
            from /home/sysnjk/rails/lists/config/boot.rb:109:in `<top (required)>'
            from script/server:2:in `require'
        from script/server:2:in `<main>'
    

    if anyone has any ideas, they'd be appreciated :)

  11. Nicolas Blanco (slainer68) Says:

    The question is : is the railsteam going to release a bug fixes minor version of Rails 2.3 before Rails 3 ? I'm really looking forward to it...

  12. Mark Dodwell Says:

    "Anything that isn’t fixtures, but creates records in tests, will fail" -- I'm using Factory Girl and creating records fine in tests?

    Also 2 of these 4 bugs are related to Rspec, and this is partly why I don't use Rspec because it's much easier to break when new rails comes out.

  13. Ryan Angilly Says:

    Hey Courtenay,

    I'm the guy who wrote the 'cant dup nilclass' post. Are you saying you ran into this problem as well? Shoot me an email if you'd like to compare notes. I never ended up solving this problem, had to keep the monkeypatch in development mode.

    Thanks, Ryan

  14. Rob Sanheim Says:

    What issues do you see with creating data in tests and breakage w/ transactions? Are you sure that isn't a non-Rails thing, maybe RSpec related?

    We create all our data inline, never use fixtures, and have not seen any issues with the nested transactions.

  15. court3nay Says:

    Rob Sanheim: it's a bug in setup/teardown and DDL statements, in this particular project i'm using model_stubbing.

    Ryan Angilly: there's a patch on lighthouse (can't find it now) that removes something to do with class reloading and modules.

  16. Andrei Erdoss Says:

    Ryan Angilly: Did you find the patch that court3nay is talking about? I also found this bug while trying to upgrade TOG (www.toghq.com) app to Rails 2.3.2. It happened exactly how you described it in your post.

  17. Larz Says:

    I had an old file in my app/view directory named something like myview.html.erb.save which is just an old file I was not using and when I started using rails 2.3.2 that file actually got rendered instead of the correct one of myview.html.erb, sort of strange I thought ..

  18. jeff Says:

    @larz: I noticed that too... had to rename mine from something.html.old.erb to _something.html.old.erb to get it to load the correct one.

Sorry, comments are closed for this article.