On 10/25/07, Michael Koziarski <[EMAIL PROTECTED]> wrote:
>
> > I would love to see this patch (or a similar one) make it in, as we
> > are dealing with this very issue with a tool we built test our apps
> > and plugins against multiple versions of Rails in our CI environment.
> > We went with the rubygem approach because it lets use gems for version
> > management, but we are hitting issues in apps due to the way the boot
> > process works.
>
> What are the other issues that you've hit? If it's just about choosing
> a different version of rails, then can't you just set
> RAILS_GEM_VERSION in environment.rb?
>
> I still don't buy the need for a pre-initializers rig, but perhaps
> there's a simpler option hiding somewhere.

Nope, this doesn't work.  boot.rb and initilization always hits before
environment.rb is interpreted, which means any code in environment.rb
is too late to have control over the rails version.  See my comments
on the patch.

By the way, I am working with this approach and the latest boot.rb
code in my projects today, and it's working great.  All I have to do
is set the RAILS_GEM_VERSION environment variable, and that
automatically loads the correct rails gem version.

I also have this hooked into cruisecontrol.rb, so that it
automatically sets the rails version based on the name of my project -
e.g.: a project name of myproject_rails_1.2.5.7919 automatically uses
that gem for rails.  This makes is a no-brainer to test my project
under multiple rails versions via CI, and requires no code changes at
all - they all use the same subversion url.

Thx,
-- Chad

--~--~---------~--~----~------------~-------~--~----~
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 [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-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to