Forum: Ruby rubygem installation problem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2eb32b43f162fcbc1dc52c8576132931?d=identicon&s=25 Sunny Bak (sunfish)
on 2009-04-22 05:53
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
58479f76374a3ba3c69b9804163f39f4?d=identicon&s=25 Eric Hodel (Guest)
on 2009-04-22 20:37
(Received via mailing list)
On Apr 21, 2009, at 20:53, Sunny Bak wrote:
> 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.
This topic is locked and can not be replied to.