Answer the question
In order to leave comments, you need to log in
Chef12 undefined method validate_spec, how to fix?
Good afternoon!
We are currently moving to chef12 from chef11. There was a problem with one of the cookbooks.
cookbook syslog_ng.
There is a line in the resources:
attribute :host, :kind_of => String, :default => '', :callbacks => { 'should not be empty' => lambda { |spec| validate_spec(spec) } }
It is not accepted by the 12 boss, and it throws an error:
/var/chef/cache/cookbooks/cron/resources/d.rb:65: warning: constant ::Fixnum is deprecated
================================================================================
Recipe Compile Error in /var/chef/cache/cookbooks/syslog_ng/resources/destination_syslog.rb
================================================================================
NoMethodError
-------------
undefined method `validate_spec' for #<Class:0x00000000052607c8>
Cookbook Trace:
/var/chef/cache/cookbooks/syslog_ng/resources/destination_syslog.rb:11:in `block in class_from_file'
/var/chef/cache/cookbooks/syslog_ng/resources/destination_syslog.rb:11:in `class_from_file'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question