# LoadError when installing RubyGems on Red Hat Linux

**URL:** <https://www.ruby-forum.com/t/loaderror-when-installing-rubygems-on-red-hat-linux/147604>\
**Category:** Rails\
**Created:** [September 3, 2008, 3:56pm UTC](https://www.ruby-forum.com/t/loaderror-when-installing-rubygems-on-red-hat-linux/147604 "2008-09-03T15:56:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gers32](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ed8c4c/32.png) [@gers32](https://www.ruby-forum.com/u/gers32)\
**Post date:** [September 3, 2008, 3:56pm UTC](https://www.ruby-forum.com/t/loaderror-when-installing-rubygems-on-red-hat-linux/147604/1 "2008-09-03T15:56:15Z")

</div>

Hi,

I’m trying to install a RoR application in a Red Hat Linux  
environment, when I was working in Windows up to now…

The Ruby installation was successful and I set the PATH to include the  
directory containing the ruby executable. But when installing RubyGems  
via “ruby setup.rb” (or “ruby setup.rb config”, depending on the  
information source…), I get the following error message:

./lib/rubygems.rb:10:in `require': no such file to load -- thread (LoadError) from ./lib/rubygems.rb:10 from setup.rb:22:in`require’  
from setup.rb:22

According to the little I found on the Internet, it seems to be caused  
either by a missing ruby file/package or a missing path in my PATH  
environment variable… But I’m stuck at this point.

Thanks for your help,

Chris.

---

<div class="post-metadata">

**Author:** ![gers32](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ed8c4c/32.png) [@gers32](https://www.ruby-forum.com/u/gers32)\
**Post date:** [September 3, 2008, 5:05pm UTC](https://www.ruby-forum.com/t/loaderror-when-installing-rubygems-on-red-hat-linux/147604/2 "2008-09-03T17:05:27Z")

</div>

gers32 wrote:

> The Ruby installation was successful and I set the PATH to include the  
> directory containing the ruby executable. But when installing RubyGems  
> via “ruby setup.rb” (or “ruby setup.rb config”, depending on the  
> information source…), I get the following error message:
> 
> ./lib/rubygems.rb:10:in `require': no such file to load -- thread (LoadError) from ./lib/rubygems.rb:10 from setup.rb:22:in `require’  
> from setup.rb:22

Perhaps you need to add the --enable-pthread option to  
the Ruby compile config.

–  
Rails Wheels - Find Plugins, List & Sell Plugins -  
[http://railswheels.com](http://railswheels.com)

---

<div class="post-metadata">

**Author:** ![gers32](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ed8c4c/32.png) [@gers32](https://www.ruby-forum.com/u/gers32)\
**Post date:** [September 4, 2008, 12:02pm UTC](https://www.ruby-forum.com/t/loaderror-when-installing-rubygems-on-red-hat-linux/147604/3 "2008-09-04T12:02:35Z")

</div>

Thanks for the suggestion. I was able to install RubyGems successfully  
by following the instructions from the following blog post:

[http://betweengo.com/ruby-on-rails/2008/03/28/installing-ruby-on-rails-on-red-hat-enterprise-linux-4/](http://betweengo.com/ruby-on-rails/2008/03/28/installing-ruby-on-rails-on-red-hat-enterprise-linux-4/)

For some reason, the previous installation didn’t update the PATH  
environment variable, among other things surely… So I suspect there  
was something wrong with my Ruby installation in the first place.

Cheers,

Chris.
