Hello boys and girls ,
I come to you with a strange issue .
I have the following bit of code :
packages = %w( 'lsof' )
packages.each do |p| package p end
Which yields the error
>>>> Caused by Chef::Exceptions::Package: No candidate version available for 'lsof'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.8.5/lib/chef/mixin/why_run.rb:240:in `run'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.8.5/lib/chef/mixin/why_run.rb:321:in `block in run'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.8.5/lib/chef/mixin/why_run.rb:320:in `each'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.8.5/lib/chef/mixin/why_run.rb:320:in `run'
BUT on the other side , if I comment out that code and put instead just
package 'lsof'
Then it works just fine . Can anyone just tell me where i am doing wrong ?