This project is archived and is in readonly mode.

#3370 ✓wontfix

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

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

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!

Comments and changes to this ticket

  • Ben Marini

    Ben Marini October 13th, 2009 @ 04:15 AM

    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
      :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
      :verbose: false
      install: --no-wrappers
      update: --no-wrappers
  • tsailipu

    tsailipu October 13th, 2009 @ 04:26 AM

    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 ;)

  • Ben Marini

    Ben Marini October 14th, 2009 @ 04:12 AM

    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.

  • tsailipu

    tsailipu October 14th, 2009 @ 04:22 AM

    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!

  • Ryan Bigg

    Ryan Bigg June 6th, 2010 @ 02:47 AM

    • State changed from “new” to “resolved”

    Use ~/.gemrc for this.

  • Ryan Bigg

    Ryan Bigg June 6th, 2010 @ 02:47 AM

    • State changed from “resolved” to “wontfix”

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=""></a>