[root@puppet modules]# ruby -rpuppet /var/lib/puppet/lib/puppet/parser/functions/foreman.rb
/usr/lib/ruby/site_ruby/1.8/puppet/parser/functions.rb:242:in `merged_functions': undefined method `[]' for nil:NilClass (NoMethodError)
from /usr/lib/ruby/site_ruby/1.8/puppet/parser/functions.rb:247:in `get_function'
from /usr/lib/ruby/site_ruby/1.8/puppet/parser/functions.rb:132:in `newfunction'
from /var/lib/puppet/lib/puppet/parser/functions/foreman.rb:38
This exact error appears on every single custom function, including all the stdlib ones (naturally, only the last line differs slightly)
The 38th line in the foreman.rb file is the newfunction call:
module Puppet::Parser::Functions
newfunction(:foreman, :type => :rvalue) do |args|
Nothing further gets called ever, on any of the functions.
I had a quick look through those libraries, but as I'm not a ruby black belt, this seems a bit beyond me.
Does anyone have any idea what could be causing this, or could point me where to look at for further torubleshooting?
Note, this is apparent on both puppet 3.5.1 and 3.6, ruby 1.8.7 (from centos repositories).
Thanks in advance!
Karolis