Rails 2.3.x With Ruby 1.9.2

100 views
Skip to first unread message

Ken Collins

unread,
Oct 28, 2010, 10:12:19 AM10/28/10
to Ruby on Rails: Core

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


Paul Sponagl

unread,
Oct 28, 2010, 10:21:00 AM10/28/10
to rubyonra...@googlegroups.com
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

> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To unsubscribe from this group, send email to rubyonrails-co...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
>
>
>
>
>

Gru�

Paul


!DSPAM:4cc986ce55518263013727!


Stephen

unread,
Oct 28, 2010, 10:32:18 AM10/28/10
to rubyonra...@googlegroups.com

Ken Collins

unread,
Oct 28, 2010, 12:12:12 PM10/28/10
to rubyonra...@googlegroups.com

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


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

Ken Collins

unread,
Oct 28, 2010, 2:13:43 PM10/28/10
to rubyonra...@googlegroups.com
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?

Aaron Patterson

unread,
Oct 28, 2010, 3:10:22 PM10/28/10
to rubyonra...@googlegroups.com
On Thu, Oct 28, 2010 at 02:13:43PM -0400, Ken Collins wrote:
> 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.

--
Aaron Patterson
http://tenderlovemaking.com/

Stephen Blackstone

unread,
Oct 28, 2010, 3:27:03 PM10/28/10
to rubyonra...@googlegroups.com, rubyonra...@googlegroups.com
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


Sent from my iPhone

On Oct 28, 2010, at 12:12 PM, Ken Collins <k...@metaskills.net> wrote:

Michael Koziarski

unread,
Oct 28, 2010, 3:59:56 PM10/28/10
to rubyonra...@googlegroups.com
> 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


--
Cheers

Koz

Aaron Patterson

unread,
Oct 29, 2010, 8:02:42 AM10/29/10
to rubyonra...@googlegroups.com

Really? I thought 2.3.x was 1.8.7+?

Ken Collins

unread,
Oct 29, 2010, 10:14:16 AM10/29/10
to rubyonra...@googlegroups.com

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

Stephen

unread,
Oct 29, 2010, 10:49:20 AM10/29/10
to rubyonra...@googlegroups.com
I am able to run test_mysql ok - rails 2.3.10 and ruby 1.9.2p0.  5 errors and 2 failures..

Michael Koziarski

unread,
Oct 29, 2010, 3:30:55 PM10/29/10
to rubyonra...@googlegroups.com
> 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 :)


--
Cheers

Koz

Will Bryant

unread,
Oct 30, 2010, 9:08:58 AM10/30/10
to rubyonra...@googlegroups.com
On Sat, Oct 30, 2010 at 1:02 AM, Aaron Patterson
<aa...@tenderlovemaking.com> wrote:
> Really?  I thought 2.3.x was 1.8.7+?

I believe that requirement was introduced only for 3.0.

Stephen

unread,
Nov 3, 2010, 2:30:46 PM11/3/10
to rubyonra...@googlegroups.com
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



Reply all
Reply to author
Forward
0 new messages