Skip to content

Could not retrieve local facts: uninitialized constant Gem #151

@krissik

Description

@krissik

I have installed stankevich-python on my puppet master (Debian Wheezy). In my nodes (Debian Wheezy) [agent] section I have pluginsync=true. While running puppet agent --test this error is show:

info: Retrieving plugin
debug: file_metadata supports formats: b64_zlib_yaml pson raw yaml; using pson
debug: Using cached certificate for ca
debug: Using cached certificate for puppet-node
debug: Using cached certificate_revocation_list for ca
debug: Finishing transaction 70237949330680
debug: report supports formats: b64_zlib_yaml pson raw yaml; using pson
err: Could not run Puppet configuration client: Could not retrieve local facts: uninitialized constant Gem

After installing rubygems using apt-get it works, but I do not want to install rubygems package on all nodes manually. In addition I have tried to add rubygems package to my module but this does not work too. At the node facter can be run without an error.

Update:
I have installed it using puppet module install stankevich-python. If I clone your repo and compare both lib/facter/pip_version.rb this is the diff:

< require 'rubygems'
< 
< facter_puppet_version = Facter.value(:puppetversion)
< facter_is_pe = Facter.value(:is_pe)
< 
< if facter_is_pe
<     facter_puppet_version = facter_puppet_version.to_s.split(' ')[0]
< end
< 
< if Gem::Version.new(facter_puppet_version) >= Gem::Version.new('3.6')

---
> if Gem::Version.new(Facter.value(:puppetversion)) >= Gem::Version.new('3.6')

Maybe this is the reason for the error? puppet module list shows stankevich-python (v1.7.15)

Update 2:
Now I see that the changes that resolve the problem in commit 82f49a5 are not yet in the actual release.

Sorry for the noise.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions