This project is archived and is in readonly mode.
App templates should support custom env files for the "gem" command
Reported by Carlos Paramio | February 9th, 2009 @ 12:36 PM | in 2.x
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
Comments and changes to this ticket
-
Pratik February 9th, 2009 @ 12:40 PM
- Assigned user set to Pratik
-
Carlos Paramio February 9th, 2009 @ 05:50 PM
I rethinked this, and it might be a better idea to not use a custom token like :global for the env option to specify the global environment file. This other patch uses nil instead.
-
Pratik May 18th, 2009 @ 09:59 PM
- State changed from new to duplicate
Seems to have been fixed by http://github.com/rails/rails/commit/16b3d2b621b1682f249209097c31b0...
Thanks.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>