This project is archived and is in readonly mode.

#1918 ✓duplicate
Carlos Paramio

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

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>

People watching this ticket

Pages