Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LoadError: cannot load such file -- chef/mixin/homebrew_user when spinning a test server #14828

Open
nithyatg-93 opened this issue Jan 29, 2025 · 1 comment
Labels
Status: Untriaged An issue that has yet to be triaged.

Comments

@nithyatg-93
Copy link

When spinning up the server where chef-client is installed found an error :
Chef-client version: 18.5.0.

even tried to installed the libraries for homebrew and tried executing but still getting same error

Generated at 2025-01-29 06:09:22 -0500
LoadError: cannot load such file -- chef/mixin/homebrew_user
internal:/opt/chef/embedded/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb:85:in require' <internal:/opt/chef/embedded/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in require'
/var/chef/cache/cookbooks/homebrew/libraries/helpers.rb:23:in <class:HomebrewUserWrapper>' /var/chef/cache/cookbooks/homebrew/libraries/helpers.rb:22:in <top (required)>'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.6.2/lib/chef/run_context/cookbook_compiler.rb:290:in require' /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.6.2/lib/chef/run_context/cookbook_compiler.rb:290:in block in load_libraries_from_cookbook'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.6.2/lib/chef/run_context/cookbook_compiler.rb:431:in block (2 levels) in each_file_in_cookbook_by_segment' /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.6.2/lib/chef/run_context/cookbook_compiler.rb:428:in each'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.6.2/lib/chef/run_context/cookbook_compiler.rb:428:in block in each_file_in_cookbook_by_segment' /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.6.2/lib/chef/run_context/cookbook_compiler.rb:427:in each'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.6.2/lib/chef/run_context/cookbook_compiler.rb:427:in each_file_in_cookbook_by_segment' /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.6.2/lib/chef/run_context/cookbook_compiler.rb:287:in load_libraries_from_cookbook'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.6.2/lib/chef/run_context/cookbook_compiler.rb:135:in block in compile_libraries' /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.6.2/lib/chef/run_context/cookbook_compiler.rb:132:in each'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.6.2/lib/chef/run_context/cookbook_compiler.rb:132:in compile_libraries' /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.6.2/lib/chef/run_context/cookbook_compiler.rb:103:in compile'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.6.2/lib/chef/run_context.rb:259:in load' /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.6.2/lib/chef/policy_builder/expand_node_object.rb:103:in setup_run_context'
/opt/chef/embedded/lib/ruby/3.1.0/forwardable.rb:238:in setup_run_context' /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.6.2/lib/chef/client.rb:493:in setup_run_context'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.6.2/lib/chef/client.rb:294:in run' /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.6.2/lib/chef/application.rb:305:in run_with_graceful_exit_option'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.6.2/lib/chef/application.rb:281:in block in run_chef_client' /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.6.2/lib/chef/local_mode.rb:42:in with_server_connectivity'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.6.2/lib/chef/application.rb:264:in run_chef_client' /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.6.2/lib/chef/application/base.rb:354:in run_application'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.6.2/lib/chef/application.rb:67:in run' /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-bin-18.6.2/bin/chef-client:25:in <top (required)>'
/usr/bin/chef-client:192:in load' /usr/bin/chef-client:192:in

'

@nithyatg-93 nithyatg-93 added the Status: Untriaged An issue that has yet to be triaged. label Jan 29, 2025
@Stromweld
Copy link
Contributor

can you try removing the homebrew cookbook from your dependencies. Chef-client has built in homebrew resources. https://docs.chef.io/resources/homebrew_cask/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Untriaged An issue that has yet to be triaged.
Projects
None yet
Development

No branches or pull requests

2 participants