[Rubygems-developers] Question on GEM_PATH

Martin Krauskopf martin.krauskopf at gmail.com
Wed Jan 23 07:24:36 EST 2008

Eric Hodel wrote:
> On Dec 15, 2007, at 23:05 PM, Chad Woolley wrote:
>> When I use GEM_PATH to add an additional local repository to be used,
>> what dirs must be in that repository?  gems?  specifications? docs?
>> cache? others?
> The directory doesn't even need to exist.  RubyGems will create it and  
> everything it needs inside it when you reference it, provided you have  
> permission to do so.

Hi, reviving little old thread,

I've noticed the automatic repository creation on demand. My question is 
whether there is an 'official' way to initialize/create a new repository 
'just now', without waiting for a 'demand'.
My use-case is that in the IDE I'll let user adjust a GEM_PATH. Ff the 
user enter a non-existing or empty repository, I'll show the dialog 
saying something like:

   "The directory is not a valid RubyGems repository, do you want to set
    it up?"  [Yes] [No]

If 'Yes' what should I run? I tried just a 'gem env' and it will 
create/setup gems repositories in all non-repository directories on the 
So may I rely on 'gem env' or is there a more correct way?


More information about the Rubygems-developers mailing list