On Thu, Feb 18, 2010 at 5:36 PM, Jeff <[email protected]> wrote:

> On Feb 18, 4:31 am, Conrad Taylor <[email protected]> wrote:
> > On Wed, Feb 17, 2010 at 9:23 PM, Jeff <[email protected]> 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 [email protected].
> To unsubscribe from this group, send email to
> [email protected]<rubyonrails-talk%[email protected]>
> .
> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to