# Rubygems 0.9.5 install issue

**URL:** <https://www.ruby-forum.com/t/rubygems-0-9-5-install-issue/122124>\
**Category:** Ruby\
**Created:** [December 4, 2007, 8:08pm UTC](https://www.ruby-forum.com/t/rubygems-0-9-5-install-issue/122124 "2007-12-04T20:08:28Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![kyle\_s](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f6c823/32.png) [@kyle\_s](https://www.ruby-forum.com/u/kyle_s)\
**Post date:** [December 4, 2007, 8:08pm UTC](https://www.ruby-forum.com/t/rubygems-0-9-5-install-issue/122124/1 "2007-12-04T20:08:28Z")

</div>

I was attempting to install rubygems on a machine that has, and  
otherwise runs ruby just fine (installed in /usr/local/).  
every attempt at installing rubygems ends the same way:  
after a slew of install -c lines that are fine, I get this  
./lib/rubygems/custom\_require.rb:27:in `gem\_origonal\_require’ : no  
such file to load – socket (LoadError)

(there’s more to the error, but that machine has no network right now,  
and I don’t feel like typing it all 😉

Thanks in advance.

–Kyle

---

<div class="post-metadata">

**Author:** ![kyle\_s](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f6c823/32.png) [@kyle\_s](https://www.ruby-forum.com/u/kyle_s)\
**Post date:** [December 4, 2007, 11:42pm UTC](https://www.ruby-forum.com/t/rubygems-0-9-5-install-issue/122124/2 "2007-12-04T23:42:03Z")

</div>

I just had the exact same problem and solved it by installing/compiling  
rubygems in a directory that is in my path. I used /usr/local and  
everything came up fine.

jackster

Kyle S. wrote:

> I was attempting to install rubygems on a machine that has, and  
> otherwise runs ruby just fine (installed in /usr/local/).  
> every attempt at installing rubygems ends the same way:  
> after a slew of install -c lines that are fine, I get this  
> ./lib/rubygems/custom\_require.rb:27:in `gem\_origonal\_require’ : no  
> such file to load – socket (LoadError)
> 
> (there’s more to the error, but that machine has no network right now,  
> and I don’t feel like typing it all 😉
> 
> Thanks in advance.
> 
> –Kyle

---

<div class="post-metadata">

**Author:** ![kyle\_s](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f6c823/32.png) [@kyle\_s](https://www.ruby-forum.com/u/kyle_s)\
**Post date:** [December 5, 2007, 8:47pm UTC](https://www.ruby-forum.com/t/rubygems-0-9-5-install-issue/122124/3 "2007-12-05T20:47:14Z")

</div>

John, I’m not sure I follow about compiling it in a directory in your  
path. You mean copying the installer into /usr/local/bin, then  
running it?

I’ve set my PATH to include /usr/local/bin (which includes ruby) to no  
avail.

Still trying.  
–Kyle

---

<div class="post-metadata">

**Author:** ![kyle\_s](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f6c823/32.png) [@kyle\_s](https://www.ruby-forum.com/u/kyle_s)\
**Post date:** [December 5, 2007, 9:13pm UTC](https://www.ruby-forum.com/t/rubygems-0-9-5-install-issue/122124/4 "2007-12-05T21:13:36Z")

</div>

I copied the install files to /usr/local and installed it there and got  
past this error.

jackster

Kyle S. wrote:

> John, I’m not sure I follow about compiling it in a directory in your  
> path. You mean copying the installer into /usr/local/bin, then  
> running it?
> 
> I’ve set my PATH to include /usr/local/bin (which includes ruby) to no  
> avail.
> 
> Still trying.  
> –Kyle

---

<div class="post-metadata">

**Author:** ![kyle\_s](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f6c823/32.png) [@kyle\_s](https://www.ruby-forum.com/u/kyle_s)\
**Post date:** [December 6, 2007, 4:15pm UTC](https://www.ruby-forum.com/t/rubygems-0-9-5-install-issue/122124/5 "2007-12-06T16:15:58Z")

</div>

_cough cough_  
apparently there was an error in the ruby install, and it was missing  
the socket library 🙂  
_DOH_  
–Kyle

---

<div class="post-metadata">

**Author:** ![kyle\_s](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f6c823/32.png) [@kyle\_s](https://www.ruby-forum.com/u/kyle_s)\
**Post date:** [December 6, 2007, 9:20pm UTC](https://www.ruby-forum.com/t/rubygems-0-9-5-install-issue/122124/6 "2007-12-06T21:20:33Z")

</div>

Hu. I thought the rebuild with no errors was proof it was good, but  
socket was still missing. Apparently I had to pass --disable-ipv6 to  
get the extensions to build clean on this box. The funny thing is,  
that’s not an option ./configure --help lists.

Anyway, not rubygems installed clean.

Thanks for the help.  
–Kyle

---

<div class="post-metadata">

**Author:** ![kyle\_s](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f6c823/32.png) [@kyle\_s](https://www.ruby-forum.com/u/kyle_s)\
**Post date:** [December 6, 2007, 10:31pm UTC](https://www.ruby-forum.com/t/rubygems-0-9-5-install-issue/122124/7 "2007-12-06T22:31:40Z")

</div>

Kyle…it doesn’t seem to be over for me…

My gems finally installed ok and I was able to pull down several gems  
successfully. But now, I’m trying to run a simple script that uses  
require “snmp” to poll some networking devices and I’m getting the  
following error:

./snmp.rb:6: uninitialized constant SNMP (NameError)  
from  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
gem\_original\_require’  
from  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
`require’  
from ./snmp.rb:5

I successfully installed the following 3 gems:  
snmp (1.0.1)  
snmpscan (0.1)  
snmptop (0.0.1)

Here is the code in snmp.rb:

#!/usr/local/bin/ruby  
require “ruby gems”  
require “snmp”  
SNMP::Mangager.open(:Host =\> “172.30.152.1”) do |m| response =  
m.get([“syslocation.0”, “sysuptime.0”]) response.each\_varbind { |vb|  
puts “#{vb.name}: #{vb.value}” } end

It looks to me like ruby isn’t finding the snmp gem that I installed?

Do you have any ideas that might help me now 🙂

thanks  
jackster

Kyle S. wrote:

> Hu. I thought the rebuild with no errors was proof it was good, but  
> socket was still missing. Apparently I had to pass --disable-ipv6 to  
> get the extensions to build clean on this box. The funny thing is,  
> that’s not an option ./configure --help lists.
> 
> Anyway, not rubygems installed clean.
> 
> Thanks for the help.  
> –Kyle

---

<div class="post-metadata">

**Author:** ![kyle\_s](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f6c823/32.png) [@kyle\_s](https://www.ruby-forum.com/u/kyle_s)\
**Post date:** [December 6, 2007, 4:18pm UTC](https://www.ruby-forum.com/t/rubygems-0-9-5-install-issue/122124/8 "2007-12-06T16:18:06Z")

</div>

so you’re up and running?

Kyle S. wrote:

> _cough cough_  
> apparently there was an error in the ruby install, and it was missing  
> the socket library 🙂  
> _DOH_  
> –Kyle

---

<div class="post-metadata">

**Author:** ![kyle\_s](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f6c823/32.png) [@kyle\_s](https://www.ruby-forum.com/u/kyle_s)\
**Post date:** [December 7, 2007, 4:29pm UTC](https://www.ruby-forum.com/t/rubygems-0-9-5-install-issue/122124/9 "2007-12-07T16:29:11Z")

</div>

Err, without knowing that library, are you sure it’s not  
require ‘net/snmp’  
?

–Kyle
