On Tuesday, September 16, 2014 4:44:32 AM UTC-5, Jonathan Gazeley wrote:
>
> Overnight my Facter seems to reporting new errors. As far as I can see, 
> neither Puppet, Facter, MCollective or the facts in question were 
> updated, so I'm struggling to find a cause. The problem as exacerbated 
> because MCollective is emailing me with the same error every 15 minutes. 
>
> This error is printed when I run facter: 
>
> Error loading fact /var/lib/puppet/lib/facter/warranty.rb: no such file 
> to load -- facter/util/warranty 
>
> The fact is provided by this module (my module, but not my code) 
>
> https://forge.puppetlabs.com/jgazeley/dell 
>
> The file /var/lib/puppet/lib/facter/warranty.rb does exist on my system 
> and is readable as is the referenced submodule in 
> /var/lib/puppet/lib/facter/util/warranty.rb , so I am not sure what is 
> causing the problem. 
>
>

My first guess would be a load path problem.  If you're willing to limit 
your module to Ruby 1.9+, then you could try replacing the offending 
'require' call with

    require_relative 'util/warranty'

Even if you don't want that Ruby version constraint, it might be 
illuminating to see whether 'require_relative' in fact does solve the 
problem.

For testing only, you could also consider printing the $LOAD_PATH just 
before executing the 'require'.

And speaking of Ruby version, are you certain *that* didn't change on you?  
Clearly something did.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/69d6a1ec-29fd-4998-8f40-e96378798187%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to