Ruby 致命:命名错误:未定义的方法'each#u char';对于[“bundle”和“install”]:数组,您的意思是什么?各自为政

Ruby 致命:命名错误:未定义的方法'each#u char';对于[“bundle”和“install”]:数组,您的意思是什么?各自为政,ruby,rubygems,chef-infra,chef-recipe,Ruby,Rubygems,Chef Infra,Chef Recipe,我正在帮助Chef自动化部署过程,我已经在Chef环境中配置了所有内容 OS & Version details are as below Chef Server - RHEL7 Chef Workstation - Windows 7 Professional Chef node : Windows 2016 Server Datacenter Chef Development Kit Version: 3.3.23 chef-client version: 14.5.33 ber

我正在帮助Chef自动化部署过程,我已经在Chef环境中配置了所有内容

OS & Version details are as below
Chef Server - RHEL7
Chef Workstation - Windows 7 Professional
Chef node : Windows 2016 Server Datacenter


Chef Development Kit Version: 3.3.23
chef-client version: 14.5.33
berks version: 7.0.6
kitchen version: 1.23.2
inspec version: 2.2.112
创建了一个示例cookbook,只是为了在执行chef client的节点中创建一个test.txt文件。 下面是我们在菜谱上使用的文件资源

file 'C:\\temp\\something.txt' do
  rights :read, 'Everyone'
  #rights :full_control, 'DOMAIN\\User'
  action :create
end
在远程节点上运行chef客户端时出现以下错误

Running handlers:
[2019-10-15T19:25:18+08:00] ERROR: Running exception handlers
Running handlers complete
[2019-10-15T19:25:18+08:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 15 seconds
[2019-10-15T19:25:18+08:00] INFO: Sending resource update report (run-id: 5ea7d4d4-2cd4-4456-bcf4-5458fbfdb31d)
[2019-10-15T19:25:19+08:00] FATAL: Stacktrace dumped to c:/chef/cache/chef-stacktrace.out
[2019-10-15T19:25:19+08:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2019-10-15T19:25:19+08:00] FATAL: NoMethodError: undefined method 'each_char' for ["bundle", "install"]:Array
Did you mean?  each_cons
我对ruby不太了解。
附件

谢谢@anothermh,这是一个ChefDK分类,在下次更新时修复。将Chef DK和Chef client升级到最新版本修复了我的问题

谢谢@anothermh,这是ChefDK分类,在下次更新时修复。将Chef DK和Chef client升级到最新版本修复了我的问题

我可以告诉您一些有关该错误的信息。Chef正在尝试运行
bundle install
以安装依赖项。它通过将命令传递给
shell\u out
来实现这一点。在这方面的文档中,它说“在windows上,数组args不受支持,[因此]由调用方在字符串数组上加入(“”)。”您在windows上,因此它应该传递字符串
“bundle install”
,但它传递的是数组
[“bundle”,“install”]
。在我看来,它像是Chef中的一个bug,因为它应该在某个地方将数组转换为字符串,而不是。在他们的github上发布。请不要链接到承载代码的外部站点。如果你有与你的问题相关的代码,那么你必须把它直接包含在你的问题中。我可以告诉你一些关于这个错误的信息。Chef正在尝试运行
bundle install
以安装依赖项。它通过将命令传递给
shell\u out
来实现这一点。在这方面的文档中,它说“在windows上,数组args不受支持,[因此]由调用方在字符串数组上加入(“”)。”您在windows上,因此它应该传递字符串
“bundle install”
,但它传递的是数组
[“bundle”,“install”]
。在我看来,它像是Chef中的一个bug,因为它应该在某个地方将数组转换为字符串,而不是。在他们的github上发布。请不要链接到承载代码的外部站点。如果您有与您的问题相关的代码,那么您必须将其直接包含在您的问题中。