# Ruby: no such file to load -- ubygems (LoadError)

**URL:** <https://www.ruby-forum.com/t/ruby-no-such-file-to-load-ubygems-loaderror/76327>\
**Category:** Ruby\
**Created:** [March 3, 2006, 6:40pm UTC](https://www.ruby-forum.com/t/ruby-no-such-file-to-load-ubygems-loaderror/76327 "2006-03-03T18:40:55Z")\
**Posts on this page:** 3\
**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:** [March 3, 2006, 6:40pm UTC](https://www.ruby-forum.com/t/ruby-no-such-file-to-load-ubygems-loaderror/76327/1 "2006-03-03T18:40:55Z")

</div>

Greetings,

After having used Ruby for some time, first on Windows and Linux, my  
colleague and I together decided to upgrade our WinXP systems to Ruby  
1.8.4. He used the Window’s installer version while I decided to build  
my own. Coincidentally, we’re both getting the same error when trying  
to test our installation w/a simple helloworld.rb applet.

> ruby  
> p “test”

upon hitting enter and BEFORE I end the file for ruby to process the  
stdin, we get the following error:

ruby: no such file to load – ubygems (LoadError)

irb runs just fine, btw. Any idea what’s wrong here?

Thx,

Ken

---

<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:** [March 3, 2006, 7:26pm UTC](https://www.ruby-forum.com/t/ruby-no-such-file-to-load-ubygems-loaderror/76327/2 "2006-03-03T19:26:22Z")

</div>

> ruby: no such file to load – ubygems (LoadError)

It sounds like your RUBYOPT environment variable is set to “-rubygems”,  
to  
load gems, but you don’t have rubygems installed.

You should be able to either install gems, or unset that variable.

Caleb

---

<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:** [March 3, 2006, 7:44pm UTC](https://www.ruby-forum.com/t/ruby-no-such-file-to-load-ubygems-loaderror/76327/3 "2006-03-03T19:44:29Z")

</div>

That did the trick! Thanks Caleb!

Ken
