Forum: Ruby NoMethodError for SNMP::MIB.oid (newby!)

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
088110fadfa112d1d2f73204a26e111a?d=identicon&s=25 Toby Rodwell (alansmithee)
on 2007-01-07 19:07
I'm using the snmp library for Ruby.  My programs are very basic and are
developments of the example scripts in the documentation.  At the moment
I'm trying to get an OID and thought that to do that I could use
but I get a 'NoMethodError' even though the oid method clearly does
exist.  What gives?  Thanks in advance!

PS  What I'm actually try to do is to give "ifDescr"  and get in return.
088110fadfa112d1d2f73204a26e111a?d=identicon&s=25 Toby Rodwell (alansmithee)
on 2007-01-08 00:17
"Physician, [part] heal thyself"

Well, the reason why I was getting the NoMethodError was because I was
trying to use it as a class method whereas it is in fact an instance
method.  So what I needed was something like:

newMib =

wantedOid = newMib.oid("ifIndex")

... but there's got to be quicker way of doing that surely!
This topic is locked and can not be replied to.