[Rubygems-developers] Any experiences managing gems without root access?
drbrain at segment7.net
Mon Aug 20 15:48:16 EDT 2007
On Aug 20, 2007, at 06:06, Jim Weirich wrote:
> On Aug 20, 2007, at 6:16 AM, Chad Woolley wrote:
>> On 7/25/07, Ryan Davis <ryand-ruby at zenspider.com> wrote:
>>> I don't think that is right. GEM_HOME seems to be ... sketchy. I
>>> think you want GEM_PATH and to use the -i flag on 'gem install'... I
>>> got it working once and have a transcript with Jim where I worked it
>>> out. I plan on writing it up because it'll really help consultants.
>> OK, this is stumping me. I'd like to use a non-root user, without
>> using sudo, to be able to
>> 1. setup/install the rubygems dist from scratch to an alternate
>> location for which the user has write access
>> 2. install/uninstall gems from that location
>> 3. tell rubygems at application runtime to only use gems from that
>> location (only stick stuff gems from there on my load path)
>> Should that all be possible? If not, is any subset possible? Any
>> detailed commands would be great...
> I made a wonderful little screen cast, and then discovered my server
> is down so I have nowhere to upload it to.
> So, you get the low tech version:
> # Create a repository
> mkdir repository
> # Install the sources gem. The sources gem has to be in
> # at least one of your repositories. Since you want to make this
> # be the one an only one, there you go.
> # Oh, this assumes you have a rubygems repository already installed
> # in the more-or-less normal place.
> gem install -i repository `gem env gemdir`/cache/sources-0.0.1.gem
There's something wrong with the step before this one, installing
RubyGems as root. There's a bug in the tracker, but it is currently
low on my priority list.
Poor workers blame their tools. Good workers build better tools. The
best workers get their tools to do the work for them. -- Syndicate Wars
More information about the Rubygems-developers