[Rubygems-developers] Environment variables

Jim Weirich jim at weirichhouse.org
Sun Apr 18 15:30:39 EDT 2004

Gavin Sinclair wrote:
> I'm concerned about RUBY_GEMS: GEM_PATH would be more intuitive
> (RUBY_GEMS could mean anything, really).

I have no problems with the name change.  GEM_HOME and GEM_PATH make a 
good pair.

> And I'd expect that the
> *first* element in this path would be the target dir for installs.
> Not sure why I expect that.  Isn't that behaviour apparent somewhere
> at the moment?

Actually, the target directory is most likely the *last* element of the 
GEM_PATH (or RUBY_GEMS, whatever).  This allows the user to override 
anything in the official gem directory.

GEM_HOME and GEM_PATH/RUBY_GEMS interact like this.  If GEM_HOME is in 
the path, then the path is left as is.  If GEM_HOME is not in the path, 
it is added to the end.

-- Jim Weirich    jim at weirichhouse.org     http://onestepback.org
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)

More information about the Rubygems-developers mailing list