Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

App templates should support custom env files for the "gem" command

#1918

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

Reported by Carlos Paramio · February 9th, 2009 @ 12:36 PM

State: duplicate
Milestone: 2.x
Assigned to: Pratik Pratik
Importance: none

Activity

  1. Pratik
    Pratik
    • Assigned user set to Pratik

    February 9th, 2009 @ 12:40 PM

  2. Carlos Paramio
    Carlos Paramio

    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.

    February 9th, 2009 @ 05:50 PM

  3. Pratik
    Pratik
    • State changed from new to duplicate

    May 18th, 2009 @ 09:59 PM