Ruby convert mib to YAML Error?

I got error when smidump a mib file as following:

/opt/logstash/vendor/bundle/jruby/1.9/gems/snmp-1.2.0# ruby -d import.rb
convermib/
import.rb,

import.rb,

use local implementation, not the installed gem (if any)

$LOAD_PATH.unshift(File.dirname(FILE) + “/lib”)
require ‘snmp/mib’
if ARGV.size == 1
mib_path = ARGV[0]
puts mib_path
else
smilint_version = smilint --version
libsmi_version = smilint_version.split[1]
mib_path =
“/usr/local/Cellar/libsmi/#{libsmi_version}/share/mibs/ietf”
end

Dir["#{mib_path}/*"].each do |file|
print file
if (File.basename(file) == ‘DOT12-RPTR-MIB’)
puts " (skipping)"
else
puts
SNMP::MIB::import_module(file)
end
end

Error msg :

Exception LoadError’ at /usr/lib/ruby/2.1.0/rubygems.rb:1203 - cannot
load such file – rubygems/defaults/ruby ExceptionNameError’ at
/usr/lib/ruby/2.1.0/psych/class_loader.rb:67 - uninitialized constant
BigDecimal Exception NameError’ at
/usr/lib/ruby/2.1.0/psych/class_loader.rb:67 - uninitialized constant
DateTime ExceptionNameError’ at /usr/lib/ruby/2.1.0/psych/core_ext.rb:16

  • methodto_yaml’ not defined in Object ExceptionNameError’ at
    /usr/lib/ruby/2.1.0/psych/core_ext.rb:29 - methodyaml_as’ not defined in
    Module ExceptionNameError’ at /usr/lib/ruby/2.1.0/psych/deprecated.rb:81
  • undefined methodto_yaml_properties’ for classObject’ convermib/
    convermib//CERENT-FC-MIB.mib Exception Errno::EEXIST’ at
    /usr/lib/ruby/2.1.0/fileutils.rb:250 - File exists @ dir_s_mkdir -
    /opt/logstash/vendor/bundle/jruby/1.9/gems/snmp-1.2.0/data/ruby/snmp/mibs
    smidump: moduleconvermib//CERENT-FC-MIB.mib’ contains errors, expect
    flawed output

Anyone can help or guide me here?

how to fix that? Thanks.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs