I tried to import my Vendor's MIBs using import.rb,
i have put my .mib file(s) into a directory called mib .
/snmp-1.2.0# ls ./mib/
cpq54nn.mib cpqdmii.mib cpqhost.mib cpql2mgt.mib cpqrack.mib cpqservice.mib cpqstsys.mib
.......
OS has the libsmi package installed:
libsmi2-dev install
libsmi2ldbl:amd64 install
I got the err msg as below ,
snmp-1.2.0$ ruby -d import.rb mibs/
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'
I truly appreciate ... your help in resolving the problem.
If you're loading in a YAML file that has frozen classes that aren't defined you'll have to load those prior to deserializing this file.
I don't know what you'll encounter, it just runs until it stumbles over the first thing, but if you need DateTime then require 'date' might fix that. Whatever class is missing you need to do the same thing, track down where it's defined and require it prior to the YAML.load part.
Related
When I installed Phalcon 2.0.13 according to the https://docs.phalconphp.com/en/latest/reference/install.html description and I wanted to launch my test script then I got the following error (literally it is just a warning but it causes Phalcon not to be loaded which causes errors):
{
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20131226/phalcon.so' - /usr/lib/php/20131226/phalcon.so: undefined symbol: php_pdo_get_dbh_ce in Unknown on line 0
}
What is this symptom cased by and how could I get rid of it?
After struggling a lot, I managed to solve the problem. The {extension=phalcon.so} line should be put NOT in php.ini. Much rather, you should create a /etc/php/5.6/cli/conf.d/30-phalcon.ini file containing {extension=phalcon.so}.
The reason is that this way you can guarantee that the processing order of the ini files is appropriate.
If you want to use Phantom not just in cli but in apache module as well then copy the ini file in the corresponding directory too.
(The directory names can be different in your system.)
Puppet Agent - 64 bit v4.0.0
OS- Windows Server R2 64 bit
I am trying to install IIS by using DISM module (https://forge.puppetlabs.com/puppetlabs/dism) from Puppet site.
I am trying to run the following script. Im sure it is correct.
dism {
'IIS-WebServerRole': ensure => present,
}
dism {
'IIS-WebServer': ensure => present,
}
The module is correctly installed and I have tried re-installing it several times but I get the the error mentioned below repeatedly. How do I resolve this ?
Im using Puppet
C:\Program Files\Puppet Labs\Puppet\bin>puppet apply IIS_Install.pp
Error: Could not autoload puppet/type/dism: Attempt to redefine method set_present with block
Error: Evaluation Error: Error while evaluating a Resource Statement, Could not autoload puppet/type/dism: Attempt to redefine method set_pesent with block at C:/Program Files/Puppet Labs/Puppet/bin/IIS_Install.pp:2:3 on node win-i73ju1hai2q.localdomain
Error: Evaluation Error: Error while evaluating a Resource Statement, Could not autoload puppet/type/dism: Attempt to redefine method set_pesent with block at C:/Program Files/Puppet Labs/Puppet/bin/IIS_Install.pp:2:3 on node win-i73ju1hai2q.localdomain
Try ensure => 'present'
The error isn't very helpful, but I think it might be Puppet v4 and how the parser is different and more strict.
If that doesn't work, make sure that you should be using ensure at all. Not all resources are ensurable.
Context - We have a massive amount of Chef attributes to perform our install, something like 3000+ have now been defined and change per environment.
Problem - Sometimes a Chef recipe will reference a non-existent attribute node[:mystuff][:typo]. This results in the following error:
Recipe Compile Error in /var/chef/cache/cookbooks/<yyy>/recipes/something.rb
undefined method '[]' for nil:NilClass
This is a worthless error because it doesn't let me know exactly what node/attribute is missing. Even running with chef-client -l debug doesn't help. knife cookbook test <x> doesn't help because syntactically it is correct. Is there a way to get it to print out the exact line number that is causing the error? The recipe may contain 10s or 100s of attributes so it is a huge time waster going through line by line to discover a typo.
I wrote Chef Sugar's deep_fetch method precisely for this reason.
The error you are getting is just the by-product of Ruby hashes. For more information on deep_fetch, you can also see my blog post on the subject: https://sethvargo.com/delicious-new-chef-sugars/
I'm trying to validate using libxml-ruby's DTD#validate, but I keep getting the following warnings:
Warning: failed to load external entity "xhtml-lat1.ent" at :29.
Warning: failed to load external entity "xhtml-symbol.ent" at :34.
Warning: failed to load external entity "xhtml-special.ent" at :39.
I wouldn't mind, except I use things like …, which are defined in those, causing my XHTML to appear to be invalid.
How do I tell the DTD about those extra files? I tried running from a directory containing the .dtd file and all of the .ents, but that doesn't help.
Reading the release notes I would suspect that you need to either use
XML.default_substitute_entities = true
or
XML.default_load_external_dtd = true
or both.
I am using the ruby daemons gem to create a custom daemon for my rails project. The only problem is that when I try to start the daemons ruby lib/daemons/test_ctl start that it fails and will not start. The log file has this output.
# Logfile created on Wed Oct 22 16:14:23 +0000 2008 by /
*** below you find the most recent exception thrown, this will be likely (but not certainly) the exception that made the application exit abnormally \*\*\*
# MissingSourceFile: no such file to load -- utf8proc_native
*** below you find all exception objects found in memory, some of them may have been thrown in your application, others may just be in memory because they are standard exceptions ***
# NoMemoryError: failed to allocate memory>
# SystemStackError: stack level too deep>
# fatal: exception reentered>
# LoadError: no such file to load -- daemons>
# LoadError: no such file to load -- active_support>
# MissingSourceFile: no such file to load -- lib/string>
# MissingSourceFile: no such file to load -- utf8proc_native>
It even happens when I generate a daemon (from the rails plugin) and try to run it. Does anybody know how to fix this problem?
OK, I actually found the answer to this problem. I require two custom files in the config/environment.rb. I used relative path names and because the daemons are executed in the rails main directory it could not find these two files. after making them absolute path it fixed the problem.
I just spent 30 minutes trying to solve a similar error when trying to get daemons plugin working:
LoadError: no such file to load -- active_support
For some reason, it wasn't finding active_support lib, even though it was installed. (Perhaps due to me having frozen rails).
In my case, the solution to this was to use the absolute path for active_support in my
ctl file (eg lib/daemons/mailer_ctl).
I needed to change line 5 from:
require 'active_support'
to
require './vendor/rails/activesupport/lib/active_support.rb'