ruby - FATAL: NoMethodError: undefined method `each_char' for ["bundle", "install"]:Array 你的意思是?each_cons
问题描述
我正在使用 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
解决方案
谢谢@anothermh,这是一个 ChefDK 分类,已在下一次更新中修复。将 Chef DK 和 Chef-client 升级到最新版本解决了我的问题
推荐阅读
- elasticsearch - SPARK 的弹性搜索连接器
- java - Spring Batch 输出记录多于输入记录
- python - 旋转字符串 HackerRank 错误
- java - 如何定义在 EasyRules 中只需要执行一个规则?
- python - 将 CSV 下采样 10 倍并将其保存到另一个文件中
- spring - 为什么查找方法仅适用于组件类而不适用于名为 one 的 bean?
- javascript - 如何以角度创建摩纳哥编辑器自定义语言?
- c# - MySql 参数化存储过程在 C# 中不起作用
- c# - 如何在 C# 中从 Jason 的 serializedObject 获取数据
- groovy - 如何在 groovy 文件中的 bat 命令中获取环境变量?