[Rubygems-developers] Best practices for managing GEM_PATH, GEM_HOME, and related stuff?

Donavan Pantke avatar at spellboundnet.com
Tue Feb 26 21:24:24 EST 2008


On Tuesday 26 February 2008 08:07:33 pm Eric Hodel wrote:
> On Feb 26, 2008, at 10:27 AM, Chad Woolley wrote:
> > Scenario 1: Existing rubygems install, with some gems installed in the
> > default system location.  I want to programatically (such as
> > Gem::GemRunner) install some additional gems in a user-writeable
> > location (~/gems).  After additional gems are installed, they should
> > all (system and user-writable) be loadable with the 'gem' method
> > and/or require.
>
> According to the documentation of your shell,
>
> set GEM_PATH to `gem env gempath` with ~/gems added
> set GEM_HOME to ~/gems
>
> At this point, `gem install` will install gems into ~/gems.

Should we expose set_home and set_path? That way someone could override the 
current home and path according to what the caller wants.


Thanks!
Donavan


More information about the Rubygems-developers mailing list