Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not retrieve local facts: uninitialized constant Gem #151

Closed
krissik opened this issue Nov 19, 2014 · 1 comment
Closed

Could not retrieve local facts: uninitialized constant Gem #151

krissik opened this issue Nov 19, 2014 · 1 comment

Comments

@krissik
Copy link
Contributor

krissik commented Nov 19, 2014

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.

@shivapoudel
Copy link
Contributor

Does reverting #146 will be best. It was done due to above referenced issue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants