[Rubygems-developers] can 2 Gem directories co-exist?

Hugh Sasse hgs at dmu.ac.uk
Fri Feb 3 15:46:38 EST 2006


On Fri, 3 Feb 2006, Jim Weirich wrote:

> Oh?  Did you try it with GEM_PATH rather than GEM_HOME.  GEM_HOME
> specifies your primary repository, where gems will be installed
> (unless overriden with the -i switch).  GEM_PATH specifies what
> respositories to search for resolving gem names.  There should only be
> one repository in GEM_HOME, but you can have multiple in GEM_PATH. 
> (Also, GEM_HOME will be appended to the GEM_PATH list if it is not
> included in it).

So my earlier documentation patch was basically wrong.

--- /scratch/hgs/rubygems-0.8.11/lib/rubygems/gem_commands.rb.orig	2005-07-10 11:20:26.000000000 +0000
+++ /scratch/hgs/rubygems-0.8.11/lib/rubygems/gem_commands.rb	2006-02-03 20:42:41.098145000 +0000
@@ -977,8 +977,8 @@
       else
         out = "Rubygems Environment:\n"
         out << "  - VERSION: #{Gem::RubyGemsVersion} (#{Gem::RubyGemsPackageVersion})\n"
-        out << "  - INSTALLATION DIRECTORY: #{Gem.dir}\n"
-        out << "  - GEM PATH:\n"
+        out << "  - INSTALLATION DIRECTORY: (set ENV[\"GEM_HOME\"] to change) #{Gem.dir}\n"
+        out << "  - GEM PATH:  (set ENV[\"GEM_PATH\"] to change)\n"
         Gem.path.collect { |p| out << "     - #{p}\n" }
         out << "  - REMOTE SOURCES:\n"
         Gem::RemoteInstaller.new.sources.collect do |s|


might be better??

        Hugh


More information about the Rubygems-developers mailing list