gpt4 book ai didi

ruby - 配置错误 LoadError : cannot load such file -- chef_handler_foreman (require statement in/etc/chef/client. rb)

转载 作者:太空宇宙 更新时间:2023-11-03 18:06:17 25 4
gpt4 key购买 nike

我正在尝试将现有的 Chef 节点注册到工头。我关注了:

https://www.theforeman.org/plugins/foreman_chef/0.5/index.html

这告诉我安装 chef_handler_foreman gem 并将以下内容放入/etc/chef/client.rb:

require 'chef_handler_foreman'

foreman_server_options 'https://your.proxy.server:8443'

foreman_facts_upload true

foreman_reports_upload true

foreman_enc true

我都做了。

当我运行 chef-client 时,我得到:

[root@ip-10-139-67-124 chef]# chef-client

[2017-06-29T13:25:09-04:00] FATAL: Configuration error LoadError: cannot load such file -- chef_handler_foreman

[2017-06-29T13:25:09-04:00] FATAL: /etc/chef/client.rb:4:in `from_string'

[2017-06-29T13:25:09-04:00] FATAL: Aborting due to error in '/etc/chef/client.rb'

[root@ip-10-139-67-124 chef]#

这是我安装了 gem 的证据:

[root@ip-10-139-67-124 chef]# gem list | grep chef

chef_handler_foreman (0.2.0)

我正在运行 Redhat 7.3。

我研究了以下问题和其他几个问题。对这些问题的回答表明存在区分大小写的问题,但此处并非如此:

LoadError: cannot load such file -- english

我做错了什么?感谢您的帮助。

最佳答案

你应该检查 /opt/chef/embedded/bin/gem list | grep 工头.

我怀疑您在系统 ruby​​ 中安装了 gem,而不是在 omnibus 安装程序中捆绑的 chef's ruby​​ 中,以避免与系统 ruby​​ 发生冲突。

通常你应该使用 chef 在 chef 中安装 gem 并配置它自己。使用 chef_gem 资源安装 gems,并利用 chef_client 说明书配置 Chef。

关于ruby - 配置错误 LoadError : cannot load such file -- chef_handler_foreman (require statement in/etc/chef/client. rb),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44831679/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com