From: Logan Capaldo Date: 2006-05-06T01:32:09+09:00 Subject: Re: snmp gem On May 5, 2006, at 12:09 PM, Rohit Mehta wrote: > Thanks Ara! Typing "SNMP.methods" in irb seems to give > me good output now. > > Do you know why the docs say > > require 'snmp' > > Should it instead say > > require 'rubygems' > require_gem 'snmp' > If the docs were to change, it should be to the following, not what you have above require 'rubygems' require 'snmp' require_gem only invokes #require if the gem as an autorequire attribute. The autorequire mechanism is being deprecated though, and the name of require_gem will probably change to reduce confusion. You should only use require_gem to choose a specific version e.g. require 'rubygems' require_gem 'some_gem', '1.0' # when I require 'some_gem' I want version 1.0 require 'some_gem' # actually load the code for 'some_gem' > One last question. If I installed from a tarball instead of using > gem, would > require 'snmp' work? > Probably yes. > Please forgive my newbyish questions! I am only an egg! Someday a > skilled > ruby programmer will hatch! Thanks! > > Rohit >