FATAL:NoMethodError:未定义的方法“ each_char”,用于[“ bundle”,“ install”]:Array是什么意思? each_cons

问题描述 投票:1回答:1

我正在使用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

[创建示例样本,只是为了在我们正在执行Chef-client的节点中创建一个test.txt文件。以下是我们在配方中使用的文件资源。

file 'C:\\temp\\something.txt' do
  rights :read, 'Everyone'
  #rights :full_control, 'DOMAIN\\User'
  action :create
end

在远程节点上运行chef-client时出现以下错误

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

我对红宝石知识不多。附加的stacktrace.out

ruby rubygems chef chef-recipe
1个回答
0
投票

感谢@anothermh,这是一个ChefDK分流,并且在下次更新时已修复。将Chef DK和Chef-client升级到最新版本解决了我的问题

© www.soinside.com 2019 - 2024. All rights reserved.