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

Issue with puppet-lint 1.1.0 binary on lucid #364

Closed
melissa opened this issue Nov 20, 2014 · 1 comment · Fixed by #387
Closed

Issue with puppet-lint 1.1.0 binary on lucid #364

melissa opened this issue Nov 20, 2014 · 1 comment · Fixed by #387

Comments

@melissa
Copy link

melissa commented Nov 20, 2014

When installing the puppet-lint 1.1.0 gem on lucid, I run into an undefined method error when running the binary against puppet code.

root@lucid:~# /var/lib/gems/1.8/gems/puppet-lint-1.1.0/bin/puppet-lint puppetlabs-rpmbuilder/manifests/init.pp
/var/lib/gems/1.8/gems/puppet-lint-1.1.0/bin/../lib/puppet-lint/data.rb:34:in `tokens': undefined method `[]' for nil:NilClass (NoMethodError)
    from /var/lib/gems/1.8/gems/puppet-lint-1.1.0/bin/../lib/puppet-lint/data.rb:99
    from /var/lib/gems/1.8/gems/puppet-lint-1.1.0/bin/../lib/puppet-lint/data.rb:97:in `call'
    from /var/lib/gems/1.8/gems/puppet-lint-1.1.0/bin/../lib/puppet-lint/data.rb:97:in `resource_indexes'
    from /var/lib/gems/1.8/gems/puppet-lint-1.1.0/bin/../lib/puppet-lint/checkplugin.rb:74:in `resource_indexes'
    from /var/lib/gems/1.8/gems/puppet-lint-1.1.0/bin/../lib/puppet-lint/plugins/check_conditionals.rb:5:in `check'
    from /var/lib/gems/1.8/gems/puppet-lint-1.1.0/bin/../lib/puppet-lint/checkplugin.rb:21:in `run'
    from /var/lib/gems/1.8/gems/puppet-lint-1.1.0/bin/../lib/puppet-lint/checks.rb:58:in `run'
    from /var/lib/gems/1.8/gems/puppet-lint-1.1.0/bin/../lib/puppet-lint/checks.rb:56:in `each'
    from /var/lib/gems/1.8/gems/puppet-lint-1.1.0/bin/../lib/puppet-lint/checks.rb:56:in `run'
    from /var/lib/gems/1.8/gems/puppet-lint-1.1.0/bin/../lib/puppet-lint.rb:168:in `run'
    from /var/lib/gems/1.8/gems/puppet-lint-1.1.0/bin/../lib/puppet-lint/bin.rb:59:in `run'
    from /var/lib/gems/1.8/gems/puppet-lint-1.1.0/bin/../lib/puppet-lint/bin.rb:56:in `each'
    from /var/lib/gems/1.8/gems/puppet-lint-1.1.0/bin/../lib/puppet-lint/bin.rb:56:in `run'
    from /var/lib/gems/1.8/gems/puppet-lint-1.1.0/bin/puppet-lint:7

Since, in this instance, caller is a nil object, ruby doesn't know what to do when we call it in

if caller[0][/`.*'/][1..-2] == 'check'

on line 34. It looks like caller is a method provided by ruby (http://www.ruby-doc.org/core-1.8.7/Kernel.html#method-i-caller).

Testing it out, everything else seems to work fine

irb(main):002:0> require 'puppet-lint'
=> true
root@lucid:~# /var/lib/gems/1.8/gems/puppet-lint-1.1.0/bin/puppet-lint --version
puppet-lint 1.1.0
root@lucid:~# ruby --version
ruby 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux]

I'm not running into this issue on any other platform.

@melissa melissa changed the title CLI puppet-lint 1.0.0 on lucid Issue with puppet-lint 1.0.0 binary on lucid Nov 20, 2014
@rodjek rodjek changed the title Issue with puppet-lint 1.0.0 binary on lucid Issue with puppet-lint 1.1.0 binary on lucid Jan 25, 2015
@rodjek
Copy link
Owner

rodjek commented Jan 25, 2015

This has been fixed in master (I've been testing against a newer 1.8.7 patch number and it looks like the output of Kernel#caller changed between p249 and p358) and we be part of the next release.

@rodjek rodjek closed this as completed Jan 25, 2015
This was referenced Mar 7, 2015
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

Successfully merging a pull request may close this issue.

2 participants