# Rubygem installation problem

**URL:** <https://rubytalk.org/t/rubygem-installation-problem/52980>\
**Category:** ruby-talk\
**Created:** [22 April 2009 03:53 UTC](https://rubytalk.org/t/rubygem-installation-problem/52980 "2009-04-22T03:53:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sunny\_Bak](https://avatars.discourse-cdn.com/v4/letter/s/b9bd4f/32.png) [@Sunny\_Bak](https://rubytalk.org/u/Sunny_Bak)\
**Post date:** [22 April 2009 03:53 UTC](https://rubytalk.org/t/rubygem-installation-problem/52980/1 "2009-04-22T03:53:19Z")

</div>

I installed ruby 1.8.7 and now I am trying to install rubygem 1.3.2.  
(red hat linux)

Please help me what I am doing wrong. It seems like I didn't set the  
path right somewhere.

cd rubygem-1.3.2/  
ruby setup.rb --prefix=/usr/local/rubygems  
#I added /usr/local/rubygems/bin to the path.

GEM\_HOME = /usr/local/rubygems/gemrepos  
#set the gem\_home

#when I try to execute gem:  
/usr/local/rubygems/bin/gem

#i get the following error

/usr/local/rubygems/bin/gem:8:in `require': no such file to load --  
rubygems (LoadError) from /usr/local/rubygems/bin/gem:8

I am pulling my hair for last few hours.. Thanks

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Eric\_Hodel1](https://avatars.discourse-cdn.com/v4/letter/e/a9adbd/32.png) [@Eric\_Hodel1](https://rubytalk.org/u/Eric_Hodel1)\
**Post date:** [22 April 2009 18:35 UTC](https://rubytalk.org/t/rubygem-installation-problem/52980/2 "2009-04-22T18:35:59Z")

</div>

> I installed ruby 1.8.7 and now I am trying to install rubygem 1.3.2.  
> (red hat linux)
> 
> Please help me what I am doing wrong. It seems like I didn't set the  
> path right somewhere.
> 
> cd rubygem-1.3.2/  
> ruby setup.rb --prefix=/usr/local/rubygems  
> #I added /usr/local/rubygems/bin to the path.

Why did you use --prefix instead of installing RubyGems into the default location?

> /usr/local/rubygems/bin/gem:8:in `require': no such file to load --  
> rubygems (LoadError) from /usr/local/rubygems/bin/gem:8

RubyGems needs to be in $LOAD\_PATH. You'll need to set RUBYLIB or pass -I to all your scripts to use RubyGems.

It's better if you don't use --prefix and don't set GEM\_HOME.

> **···**
>
> On Apr 21, 2009, at 20:53, Sunny Bak wrote:
