Anybody know if the changes coming to Rails 3 that affect ActiveRecord can be applied to Rails 2.x projects as well? If it''s just the ActiveRecord gem that''s changing, then we should be able to use the new ActiveRecord gem with Rails 2 apps, right? (I ask because I''ve had trouble trying it out myself; installing the Rails 3 beta gems somehow hosed my ability to create rails 2.x apps, so until I straighten that out, I''m hoping someone might have seen some news/insight that I haven''t come across yet.) Thanks! Jeff -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Conrad Taylor
2010-Feb-18 10:31 UTC
Re: Rails 3 version of ActiveRecord usable with Rails 2?
On Wed, Feb 17, 2010 at 9:23 PM, Jeff <cohen.jeff-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Anybody know if the changes coming to Rails 3 that affect ActiveRecord > can be applied to Rails 2.x projects as well? If it''s just the > ActiveRecord gem that''s changing, then we should be able to use the > new ActiveRecord gem with Rails 2 apps, right? > >No, this isn''t possible. Why? ActiveRecord in Rails 3 is dependent on other Rails 3.0 gems. For example, AR in Rails 3 depends on the following gems: http://gemcutter.org/gems/activerecord/versions/3.0.0.beta As an exercise for yourself, you can use the above to navigate the entire dependency graph and it should be clear why your approach wouldn''t be a good idea. Furthermore, you can compare the dependency graph for both Rails 2.3.5 and Rails 3.0.0 beta: http://gemcutter.org/gems/rails/versions/2.3.5 http://gemcutter.org/gems/rails/versions/3.0.0.beta> (I ask because I''ve had trouble trying it out myself; installing the > Rails 3 beta gems somehow hosed my ability to create rails 2.x apps, > so until I straighten that out, I''m hoping someone might have seen > some news/insight that I haven''t come across yet.) > >Please post your issue(s) here with sufficient detail and the community will attempt to assist you. -Conrad> Thanks! > Jeff > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Feb 18, 4:31 am, Conrad Taylor <conra...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Wed, Feb 17, 2010 at 9:23 PM, Jeff <cohen.j...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Anybody know if the changes coming to Rails 3 that affect ActiveRecord > > can be applied to Rails 2.x projects as well? If it''s just the > > ActiveRecord gem that''s changing, then we should be able to use the > > new ActiveRecord gem with Rails 2 apps, right? > > No, this isn''t possible. Why? ActiveRecord in Rails 3 is dependent on > other Rails 3.0 gems. For example, AR in Rails 3 depends on the > following gems: > > http://gemcutter.org/gems/activerecord/versions/3.0.0.beta > > As an exercise for yourself, you can use the above to navigate the entire > dependency graph and it should be clear why your approach wouldn''t be a > good idea. Furthermore, you can compare the dependency graph for both > Rails 2.3.5 and Rails 3.0.0 beta: > > http://gemcutter.org/gems/rails/versions/2.3.5 > http://gemcutter.org/gems/rails/versions/3.0.0.betaInteresting, thanks for the links. ActiveRecord 3.0 depends on Arel, ActiveModel, and ActiveSupport. The only common dependency I see is ActiveSupport. If I could get a Rails 2.3.5 app to bind to ActiveSupport ">= 2.3.5", instead of exactly equal to 2.3.5, then perhaps it might work. Except, that I don''t know if there are breaking changes in ActiveSupport 3.0 that break Rails 2.3.5 apps (there probably are). I guess I just wish the new ActiveRecord/ActiveSupport functionality could have been added to Rails 2.x, and we could have a new version like Rails 2.4, rather than only being available with Rails 3.0. Thanks again, Jeff -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Conrad Taylor
2010-Feb-19 02:17 UTC
Re: Re: Rails 3 version of ActiveRecord usable with Rails 2?
On Thu, Feb 18, 2010 at 5:36 PM, Jeff <cohen.jeff-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Feb 18, 4:31 am, Conrad Taylor <conra...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > On Wed, Feb 17, 2010 at 9:23 PM, Jeff <cohen.j...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Anybody know if the changes coming to Rails 3 that affect ActiveRecord > > > can be applied to Rails 2.x projects as well? If it''s just the > > > ActiveRecord gem that''s changing, then we should be able to use the > > > new ActiveRecord gem with Rails 2 apps, right? > > > > No, this isn''t possible. Why? ActiveRecord in Rails 3 is dependent on > > other Rails 3.0 gems. For example, AR in Rails 3 depends on the > > following gems: > > > > http://gemcutter.org/gems/activerecord/versions/3.0.0.beta > > > > As an exercise for yourself, you can use the above to navigate the entire > > dependency graph and it should be clear why your approach wouldn''t be a > > good idea. Furthermore, you can compare the dependency graph for both > > Rails 2.3.5 and Rails 3.0.0 beta: > > > > http://gemcutter.org/gems/rails/versions/2.3.5 > > http://gemcutter.org/gems/rails/versions/3.0.0.beta > > Interesting, thanks for the links. ActiveRecord 3.0 depends on Arel, > ActiveModel, and ActiveSupport. The only common dependency I see is > ActiveSupport. If I could get a Rails 2.3.5 app to bind to > ActiveSupport ">= 2.3.5", instead of exactly equal to 2.3.5, then > perhaps it might work. Except, that I don''t know if there are > breaking changes in ActiveSupport 3.0 that break Rails 2.3.5 apps > (there probably are). > >You need to look at all the dependencies for Rails 2.3.5 requires these exact dependencies: Runtime Dependencies 1. *activeresource* = 2.3.5 <http://gemcutter.org/gems/activeresource> 2. *actionmailer* = 2.3.5 <http://gemcutter.org/gems/actionmailer> 3. *actionpack* = 2.3.5 <http://gemcutter.org/gems/actionpack> 4. *activerecord* = 2.3.5 <http://gemcutter.org/gems/activerecord> 5. *activesupport* = 2.3.5 <http://gemcutter.org/gems/activesupport> 6. *rake* >= 0.8.3 <http://gemcutter.org/gems/rake> Rails 2.3.5 requires ActiveSupport 2.3.5 (i.e. you cannot use an earlier version or a later version) of this gem. Next, the rake and bundler gems are compatible with both versions of Rails.> I guess I just wish the new ActiveRecord/ActiveSupport functionality > could have been added to Rails 2.x, and we could have a new version > like Rails 2.4, rather than only being available with Rails 3.0. > >Please understand that the Rails core team have re-architected many of the common components. Thus, you''ll need to upgrade to benefit from these changes and I would highly recommend reading the following as well as the associated links: http://guides.rails.info/3_0_release_notes.html http://guides.rails.info Good luck, -Conrad> Thanks again, > Jeff > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.