[Rubygems-developers] gems 0.9.0 on ruby 1.8.2 +ubuntu 6.10 : now way to install to $HOME

Jim Weirich jim.weirich at gmail.com
Sat Nov 4 08:36:25 EST 2006

On 11/4/06, Alexander Mikhailian <mikhailian at altern.org> wrote:
> Here is I problem I have on a fresh Ubuntu install with the ruby-1.8.2-1
> package.
> After downloading rubygems-0.9.0, I run
>   $  ruby setup.rb all --prefix=/home/lowry
> which replies with
> hook /home/lowry/hobby/rubygems-0.9.0/./post-install.rb failed:
> You don't have write permissions into the /usr/lib/ruby/gems/1.8
> directory.
> Try 'ruby setup.rb --help' for detailed usage.

 You are almost there.  The gem software is correctly installed in
/home/lowry at this point.  The last step of the install it to create an
initial gem repository to hold the gems you install.  By default, the gem
repository is located in /usr/lib/ruby/gems/1.8 (based on where your ruby
interpreter is installed).  You can change this by setting the GEM_HOME
environment variable.

Try this:

export GEM_HOME=/home/lowry/lib/ruby/gems/1.8
ruby setup.rb all --prefix=/home/lowry

Make sure you set GEM_HOME in your .profile (or setup a .gemrc file) so that
future gem operations will find the repository in its non-default location.
Otherwise the gem command and any ruby software that uses gems won't find
any installed gems.

-- 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)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20061104/2dc96b1e/attachment-0001.html 

More information about the Rubygems-developers mailing list