[Rubygems-developers] Please test for a 1.3.1

Eric Hodel drbrain at segment7.net
Wed Oct 29 20:13:45 EDT 2008


On Oct 27, 2008, at 12:22 PM, Chad Woolley wrote:
> On Sun, Oct 26, 2008 at 10:14 PM, Eric Hodel <drbrain at segment7.net>  
> wrote:
>> On Oct 25, 2008, at 20:17 PM, Chad Woolley wrote:
>>> Then will there be any way to configure all gems to be installed  
>>> and loaded from ~/.gem, without any root access required (as long  
>>> as ~/.gem/.../bin is on path)?
>>
>> GEM_PATH and GEM_HOME
>
> OK.  So essentially, if an tool which uses the RubyGems API wants to  
> make gem installation transparent and non-root, it will need to set  
> these ENV variables before invoking any API call?  And, I assume,  
> manually send the "hey you need ~/.gem/.../bin on your path" message?

If you're using the API to install gems, you get the benefit of  
the :install_dir option, so there's no need to set any environment  
variables.  If you're writing a script that drives bin/gem, you can  
either set an environment variable or specify a path with --install-dir.

The installer will take care of the warning message for you regardless.

The API in general needs to be improved, as it is difficult to do what  
you want (whatever that may be).  IIRC the methods you need to call to  
set the path are private, and I've left them private because I barely  
understand how they fit together.

> I guess that will work - but I'm still curious to know why this  
> would be difficult gem_prelude.rb for 1.9.  Do you have links to any  
> threads/IRC where this was discussed?

gem_prelude.rb (and prelude.rb) aren't supposed to do much, and that  
includes opening and parsing files, even with a naive yaml parser.   
It's more of a political problem than a technical problem.


More information about the Rubygems-developers mailing list