From: jackster the jackle Date: 2007-12-07T06:31:37+09:00 Subject: Re: rubygems 0.9.5 install issue 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 Schmitt 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 -- Posted via http://www.ruby-forum.com/.