Rails 2.3.x With Ruby 1.9.2

I need a sanity check please!

Are these two things friendly or just a bad idea? I have never been able to run the tests for 1.9.2 under 2-3-stable due to a "uninitialized constant ActiveSupport::OrderedHash" error. However, I can run basic rails 2.3 apps under 1.9.2 but notice that things like AR associations on a model can cause things to slow down so badly that 1.8.6 beats it.

If this expected is there a interest in fixing it? I ask because if 1.9.1 is not a 3.x friendly version but is what is expected for the max 2.3 app, then it makes a ruby vm upgrade path for said apps on deployed boxes a bit of a double jump. Thoughts? Sanity check?

- Ken

i am in the process of migrating a huge 2.3 app to 1.9.2

at least you should apply this patch:

http://groups.google.de/group/rubyonrails-talk/browse_thread/thread/d0d1e804f2fcac20/51798525d3b4929e?pli=1

--- a/association_collection.rb 2010-10-20 13:22:58.629947001 -0400
+++ b/association_collection.rb 2010-10-20 13:22:54.509947004 -0400
@@ -390,7 +390,7 @@
             if block_given?
               super { |*block_args| yield(*block_args) }
             else
- super
+ super unless method.to_s == "respond_to_missing?"
             end
           elsif @reflection.klass.scopes.include?(method)
             @reflection.klass.scopes[method].call(self, *args)

best
paul

Incidentally, that is against this bug:

https://rails.lighthouseapp.com/projects/8994/tickets/5410-multiple-database-queries-when-chaining-named-scopes-with-rails-238-and-ruby-192

Helpful, but I'm not sure I'm getting the sanity check I need. Does this mean you can run the ActiveRecord tests? Is it supported? Will it be supported? Is it slow like I am seeing, etc? What is the official status, etc?

  - Ken

Unless someone says they can run the tests (specifically ActiveRecord in my case) then I am going to take this as a sign that it is unsupported by the core team. The lighthouse activity on the related issues would seem to suggest such as well.

So, if I have not completely gotten that wrong is there a reason why and would I be naive to even suggest a series of patches? I am thinking there is a big reason for the tests not running for 2-3-stable under 1.9.2 akin to why 1.9.1 is not considered an option for 3.x. If there is such a reason then patches would be a waste if time and a outside in hack since the tests could not be run to verify.

What should I do? What can I do to help?

I don't know of any reason why 2-3-stable *shouldn't* work with 1.9.2.
I'm personally not testing 2-3-stable against 1.9.2, but if you provide
patches to make it work, I'm happy to test and apply them.

The slowdown for associations was bc it was doing things like querying the entire association before doing a count. This is bc 192 caused additional method missing calls. I haven't found any other issues in the last few weeks of using 192 but that's totally anecdotal

I don't know of any reason why 2-3-stable *shouldn't* work with 1.9.2.
I'm personally not testing 2-3-stable against 1.9.2, but if you provide
patches to make it work, I'm happy to test and apply them.

During the 2.3.x release cycle we were tracking pretty close to 100%
1.9 compatibility (I think that was 1.9.1 then?), but the release
dates basically didn't line up. After 2.3.0 shipped the 1.9 series
diverged and a bunch of incompatibilities arrived. So yeah, it
definitely isn't deliberate.

The only potential gotcha with applying 1.9.2 related patches is that
they have to work with 1.8.6 too which was still in debian stable when
we shipped 2.3.x

Really? I thought 2.3.x was 1.8.7+?

I created a ticket for not being able to run the ActiveRecord tests due to some loading error that I can not fathom.
https://rails.lighthouseapp.com/projects/8994/tickets/5887

I commented on ticket #5410 about running the tests too. I would be happy to do some more profiling and finding ways of making 2-3-stable as fast as 1.9.1 once I figure out my test failure.

- Thanks for the feedback.
   Ken

I am able to run test_mysql ok - rails 2.3.10 and ruby 1.9.2p0. 5 errors and 2 failures…

Really? I thought 2.3.x was 1.8.7+?

I have a couple of apps that run 2.3.x on old debian boxes with 1.8.6,
so perhaps I'm mistaken in terms of "official"" support, but it
definitely works fine :slight_smile:

I believe that requirement was introduced only for 3.0.

I posted a new patch for this issue today which should get to the root of the problem. AssociationProxy calls undef_method unless the method name is caught be a regular expression. On 1.9.2 this caused the default respond_to_missing? to be undefined.

With the default out of the way, it then reverted to using method_missing…

https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/5410