# No such file to load -- rubygems

**URL:** <https://www.ruby-forum.com/t/no-such-file-to-load-rubygems/80413>\
**Category:** Ruby\
**Created:** [December 29, 2005, 2:38pm UTC](https://www.ruby-forum.com/t/no-such-file-to-load-rubygems/80413 "2005-12-29T14:38:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [December 29, 2005, 2:38pm UTC](https://www.ruby-forum.com/t/no-such-file-to-load-rubygems/80413/1 "2005-12-29T14:38:53Z")

</div>

i’ve installed ruby 1.8.4 (on MacOS X 10.4.3) in /usr/local

when i want to update the system :  
sudo gem update --system  
i get the following error message :  
ruby: No such file to load – rubygems (LoadError)

i’ve set some env vars :  
% echo $RUBYOPT  
-rrubygems  
% echo $GEM\_HOME  
/usr/local  
then, i’m stuck…

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [December 29, 2005, 2:59pm UTC](https://www.ruby-forum.com/t/no-such-file-to-load-rubygems/80413/2 "2005-12-29T14:59:59Z")

</div>

Une bévue wrote:

> % echo $GEM\_HOME  
> /usr/local  
> then, i’m stuck…

Looks like you need to install Rubygems.

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [December 29, 2005, 3:03pm UTC](https://www.ruby-forum.com/t/no-such-file-to-load-rubygems/80413/3 "2005-12-29T15:03:03Z")

</div>

Une bévue [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> when i want to update the system :  
> sudo gem update --system  
> i get the following error message :  
> ruby: No such file to load – rubygems (LoadError)

this is because of my PATH :  
%which ruby  
/usr/bin/ruby //the default install on MacOS X  
changing the PATH order, makes it ok ))

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [December 29, 2005, 3:03pm UTC](https://www.ruby-forum.com/t/no-such-file-to-load-rubygems/80413/4 "2005-12-29T15:03:19Z")

</div>

unknown wrote:

> i’ve installed ruby 1.8.4 (on MacOS X 10.4.3) in /usr/local
> 
> when i want to update the system :  
> sudo gem update --system  
> i get the following error message :  
> ruby: No such file to load – rubygems (LoadError)
> 
> i’ve set some env vars :  
> % echo $RUBYOPT  
> -rrubygems  
> % echo $GEM\_HOME  
> /usr/local  
> then, i’m stuck…

Obvious question … have you installed rubygems into the new Ruby  
instance? It looks like you might have a gems install hanging around  
from an earlier version of Ruby (i.e. it is finding the “gem” command),  
but its not finding the rubygems.rb library.

–  
– Jim W.

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [December 29, 2005, 3:18pm UTC](https://www.ruby-forum.com/t/no-such-file-to-load-rubygems/80413/5 "2005-12-29T15:18:14Z")

</div>

Jim W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Obvious question … have you installed rubygems into the new Ruby  
> instance? It looks like you might have a gems install hanging around  
> from an earlier version of Ruby (i.e. it is finding the “gem” command),  
> but its not finding the rubygems.rb library.

thanks i found it !  
the default ruby wasn’t the latest one ))  
where i did install rubygems…  
i had only to change the PATH from :  
export PATH=PATH:/usr/local/bin:/Users/yvon/bin  
to :  
export PATH=/usr/local/bin:/Users/yvon/bin:PATH  
now i get /usr/local/bin/ruby (the latest 1.8.4)…

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [December 29, 2005, 3:15pm UTC](https://www.ruby-forum.com/t/no-such-file-to-load-rubygems/80413/6 "2005-12-29T15:15:06Z")

</div>

Timothy H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Looks like you need to install Rubygems.  
> right and not right ))  
> not right because i’ve allready installed rubygems.  
> however only for ruby in /usr/local  
> on macos x their is a “builtin” ruby 1.8.2  
> and the PATH gaves the default ruby, i’ve changed the order for the path  
> and that’s ok, /usr/local/bin/ruby is choosen…
