On 10/25/07, Michael Koziarski <[EMAIL PROTECTED]> wrote: > 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.
I just saw this was taken off the 2.0 milestone list. This is a simple patch with tests which addresses a real limitation of the current Rails. I don't think I've done a good job explaining it so far, so I'll try again in the form of a failing test scenario. Here is the scenario which is not currently possible without a preinitializer hook: 1. I want my app to use the stable gem (e.g. 1.2.5) by default, _even_ if I have a beta gem installed (e.g. 1.2.5.7919) 2. I also want to use RubyGems Advanced Versioning [1] in my RAILS_GEM_VERSION environment variable to use the _latest_ beta gem that I have installed, e.g.: RAILS_GEM_VERSION='>1.2.5' or '~>1.2.5.0' 3. I want this to happen automatically without having to modify my app (no freezing rails or modifying environment.rb), because I want my Continuous Integration system to automatically run my app against multiple rails versions for regression and edge-rails testing by simply setting the RAILS_GEM_VERSION env var prior to the build. With this patch, I can have complete control over the gem version which is loaded, and what is set in the RAILS_GEM_VERSION constant before the normal boot gem-selection process occurs. I'm flexible, if you want me to rewrite it to not have the 'preinitializers' directory and instead just have a magic hook filename, I'm glad to rewrite the patch. Just let me know. Thx, --Chad [1] http://www.rubygems.org/read/chapter/16#page76 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
