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.

There was a problem

You must be a member of this account.

This project is archived and is in readonly mode.

config.gem in environment.rb to allow no-rdoc and no-ri options

#3370

Currently config.gem in environment.rb doesn't take no-ri and no-rdoc options, resulting in unwanted documentation's being installed along with dependent gems on production machines -- lacking such options discourages usage of this nice Rails feature!

Reported by tsailipu · October 13th, 2009 @ 03:28 AM

State: wontfix
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. Ben Marini
    Ben Marini

    There's a pretty easy way to solve this problem via a ~/.gemrc or /etc/gemrc file.

    Output from "gem help env":

    The RubyGems environment can be controlled through command line arguments,
    gemrc files, environment variables and built-in defaults.
    
    Command line argument defaults and some RubyGems defaults can be set in
    ~/.gemrc file for individual users and a /etc/gemrc for all users.  A gemrc
    is a YAML file with the following YAML keys:
    
      :sources: A YAML array of remote gem repositories to install gems from
      :verbose: Verbosity of the gem command.  false, true, and :really are the
                levels
      :update_sources: Enable/disable automatic updating of repository metadata
      :backtrace: Print backtrace when RubyGems encounters an error
      :bulk_threshold: Switch to a bulk update when this many sources are out of
                       date (legacy setting)
      :gempath: The paths in which to look for gems
      gem_command: A string containing arguments for the specified gem command
    
    Example:
    
      :verbose: false
      install: --no-wrappers
      update: --no-wrappers
    

    October 13th, 2009 @ 04:15 AM

  2. tsailipu
    tsailipu

    True. I was just submitting this ticket to see whether the community likes to make config.gem easier to use and consistent with command-line options. Having to set up a .gemrc for each new machine to deploy on violates DRY ;)

    October 13th, 2009 @ 04:26 AM

  3. Ben Marini
    Ben Marini

    Hmm...I guess it depends on how you look at it. If you are setting up several Rails apps on the same server, it's a different story. I suppose it might be nice to have the option to specify it in the env file. Submit a patch, and I'll check it out.

    October 14th, 2009 @ 04:12 AM

  4. tsailipu
    tsailipu

    Yes, several apps on one machine would be quite OK with just having .gemrc set up. Sure, if no one gets to this these days first, I will submit a patch for this quick enhancement and ping you here. Thanks!

    October 14th, 2009 @ 04:22 AM

  5. Ryan Bigg
    Ryan Bigg
    • State changed from new to resolved

    Use ~/.gemrc for this.

    June 6th, 2010 @ 02:47 AM

  6. Ryan Bigg
    Ryan Bigg
    • State changed from resolved to wontfix

    June 6th, 2010 @ 02:47 AM