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

Ruby example broken? #78

Open
arioch opened this issue Nov 25, 2015 · 2 comments
Open

Ruby example broken? #78

arioch opened this issue Nov 25, 2015 · 2 comments

Comments

@arioch
Copy link

arioch commented Nov 25, 2015

Unless I've missed a step along the way the Ruby example in the readme file is
broken on Puppet 4.3.0 / PuppetDB 3.2.0.

# rpm -qa | grep -iE ^puppet
puppet-agent-1.2.7-1.el7.x86_64
puppetlabs-release-pc1-1.0.0-1.el7.noarch
puppetdb-3.2.0-1.el7.noarch
puppetdb-termini-3.2.0-1.el7.noarch
puppetserver-2.1.2-1.el7.noarch

# bundle exec gem search --local

*** LOCAL GEMS ***

bundler (1.10.6)
facter (2.4.4)
hiera (3.0.5)
httparty (0.13.7)
json (1.8.3)
json_pure (1.8.3)
multi_xml (0.5.5)
puppet (4.3.0)
# bundle exec irb
irb(main):001:0> require 'puppet/face'
=> true
irb(main):002:0> Puppet.initialize_settings
=> [:debug, :info, :notice, :warning, :err, :alert, :emerg, :crit]
irb(main):003:0> Puppet::Face[:query, :current].nodes('(Package["mysql-server"] and architecture=amd64)')
Puppet::Error: Could not find Puppet Face query
    from /usr/local/share/gems/gems/puppet-4.3.0/lib/puppet/interface.rb:100:in `[]'
    from (irb):3
    from /usr/bin/irb:12:in `<main>'
irb(main):004:0>

Any advice how to proceed?

@dalen
Copy link
Owner

dalen commented Nov 26, 2015

You need the puppetdb-terminus installed. But unfortunately that isn't gem packaged in any good way, see https://projects.puppetlabs.com/issues/16529

@dalen
Copy link
Owner

dalen commented Nov 26, 2015

That being said, in the spec tests for this module I mock the necessary bits from puppetdb-terminus to make it work. Check the spec for to see the details.

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