On 10/31/07, Chad Woolley <[EMAIL PROTECTED]> wrote: > > On 10/31/07, Jeremy Evans <[EMAIL PROTECTED]> wrote: > > Obviously any change to boot.rb that isn't included in Rails will > > require merging on upgrade. In case it wasn't clear, I was suggesting > > the change (or a similar one) be included with Rails. Rails uses > > ENV['RAILS_ENV'] for the environment if available, so using > > ENV['RAILS_GEM_VERSION'] for the gem version is similar in that > > regard. It solves this particular problem and I can't see any > > downsides. > > > > Jeremy > > The latest boot.rb in trunk does allow override by the env var. > However, this still only supports a specific version, not an advanced > version spec (e.g. floating on latest beta gem if env exists).
I'm not sure how easy it is to specify a advanced version spec (I've never needed to), but assuming it can be specified as a string, it's doable from the environment. > Also, as I said in the other thread, even if it the env var did take a > version spec instead of a specific version, it still wouldn't allow > cooler advanced hooks like auto-installation of missing gem versions > on app startup. > > We are an agile shop that works on a lot of different rails projects, > so we switch pairs, machines and projects often. These are often on > different rails releases, which may or may not be installed on a given > machine. We also want to have our CI systems automate testing of all > our projects against multiple rails versions, including the latest > edge gems, without having to even think about it. Given your scenario, my advice would be to wrap whatever command you use to start Rails (mongrel_rails, style, etc.) in a script that checks the gem version in the environment and downloads the gems before starting rails if they are not currently installed. Jeremy --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
