Hey guys,

I've sent a patch that might be interesting. This patch allows you to  
specify a custom environment for the "gem" command on your rails app  
templates. This way, you can require the gems only at the specified  
environments, and not the global environment file. For example, a gem  
command like this:
gem 'mocha', :env => :test

will add the config.gem line at the file config/environments/test.rb,  
instead of the global environment config/environment.rb. The default  
remains to the global environment file for backward compatibility.

A user can install the required gems for the Rails application  
according to the environment that is going to be used, like:

RAILS_ENV=test rake gems:install

http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1918-app-templates-should-support-custom-env-files-for-the-gem-command

What do you think?

Carlos Paramio


--~--~---------~--~----~------------~-------~--~----~
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