Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

Could not find 'chef-config' (= 12.8.0) - did find: [chef-config-12.7.2] #718

Closed
jwadolowski opened this issue Feb 28, 2016 · 12 comments
Closed

Comments

@jwadolowski
Copy link

Hi,

it seems that ohai version that comes with ChefDK 0.11.2 doesn't really do well on my machine (Ubuntu 14.04 x64):

$ chef -v
Chef Development Kit Version: 0.11.2
chef-client version: 12.7.2
berks version: 4.2.0
kitchen version: 1.5.0
$ ohai
/opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/dependency.rb:319:in `to_specs': Could not find 'chef-config' (= 12.8.0) - did find: [chef-config-12.7.2] (Gem::LoadError)
Checked in 'GEM_PATH=/home/kuba/.chefdk/gem/ruby/2.1.0:/opt/chefdk/embedded/lib/ruby/gems/2.1.0', execute `gem env` for more information
    from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/dependency.rb:328:in `to_spec'
    from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_gem.rb:65:in `gem'
    from /opt/chefdk/bin/ohai:4:in `<main>'

Cheers,
Jakub

@smurawski
Copy link

Yeah, seems the pinned version doesn't match what is shipped. Until a new ChefDK ships, you can work around it by changing the bin/ohai ruby script in the ChefDK install bits to point to 12.7.2. I'm not sure where ChefDK lands on your Ubuntu image, but on windows that's c:\opscode\chefdk\bin\ohai.

@stevehedrick
Copy link

For Macs and at least the RHEL installs it lands @ /opt/chefdk/bin/ohai. I'd guess that the deb packages would drop it in the same place.

ty @smurawski for letting us know what to change to get things going again.

@kiranemail3
Copy link

Please help me help in running ohai command on ubuntu machine

root@ip-172-31-13-194:/var/chef/cookbooks/apache# uname -a
Linux ip-172-31-13-194 3.13.0-74-generic #118-Ubuntu SMP Thu Dec 17 22:52:10 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

root@ip-172-31-13-194:/var/chef/cookbooks/apache# che
check-language-support cheetah-compile chef-client
cheetah chef chef-shell
cheetah-analyze chef-apply chef-solo
root@ip-172-31-13-194:/var/chef/cookbooks/apache# chef --version
Chef Development Kit Version: 0.11.2
chef-client version: 12.7.2
berks version: 4.2.0
kitchen version: 1.5.0
root@ip-172-31-13-194:/var/chef/cookbooks/apache# which ohai
/usr/bin/ohai
root@ip-172-31-13-194:/var/chef/cookbooks/apache# /usr/bin/ohai
/opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/dependency.rb:319:in to_specs': Could not find 'chef-config' (= 12.8.0) - did find: [chef-config-12.7.2] (Gem::LoadError) Checked in 'GEM_PATH=/root/.chefdk/gem/ruby/2.1.0:/opt/chefdk/embedded/lib/ruby/gems/2.1.0', executegem envfor more information from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/dependency.rb:328:into_spec'
from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_gem.rb:65:in gem' from /usr/bin/ohai:4:in

'
root@ip-172-31-13-194:/var/chef/cookbooks/apache#

@thomasv314
Copy link

I ran into this problem using the ChefDK .deb file.

Temporary workaround:

  1. Open the ohai binary: vim $(which ohai)
  2. Substitute gem "chef-config", "=12.8.0" with gem "chef-config", "=12.7.2".
  3. Save file

@vinyar
Copy link
Contributor

vinyar commented Mar 15, 2016

I am curious if as part of fixing this bug, there could be an improvement to CI to help prevent it from happening again?

@ggongaware
Copy link

Same problem on OSX. thomasv314's work around worked.

@atul86244
Copy link

Had the same issue on RHEL, above work around fixed it.

@kiranemail3
Copy link

Thanks to thomasv314,

Open the ohai binary: vim $(which ohai)
Substitute gem "chef-config", "=12.8.0" with gem "chef-config", "=12.7.2".
Save file

This fixed my issue. now I can run ohai command.

@vinyar
Copy link
Contributor

vinyar commented Mar 16, 2016

I believe another fix is to rebuild from master.

@pl1ght
Copy link

pl1ght commented Mar 16, 2016

Thanks @thomasv314. Upped mine to 12.9.0, fixed issue.

@kiranemail3
Copy link

Hi Thomas Vendetta,

That fixed my issue.

Regards
Kiran

On Wed, Mar 16, 2016 at 8:34 AM, Dave Withers notifications@github.com
wrote:

Thanks @thomasv314 https://github.com/thomasv314. Upped mine to 12.9.0,
fixed issue.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#718 (comment)

@danielsdeleo
Copy link
Contributor

Fixed the root cause of this in chef/ohai#776 and will be adding a fix to prevent this entire class of problem in chef/appbundler#26 There is also a test in ChefDK now which can catch this issue, so the upcoming ChefDK release will fix it.

@chef-boneyard chef-boneyard locked and limited conversation to collaborators Mar 17, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

10 participants