[chef] Re: Ohai isn't able to find mxlib-config library


Chronological Thread 
  • From: Daniel DeLeo < >
  • To:
  • Subject: [chef] Re: Ohai isn't able to find mxlib-config library
  • Date: Fri, 29 Jan 2010 14:08:03 -0700

Ohai!
When you install a ruby gem, it generates an executable file that adds
a 'require "rubygems"' to the original version. IIRC, we no longer
require rubygems in the version of ohai in the tree, but instead rely
on the gem install process to do this. So you should have a copy of
the ohai command elsewhere (depends on your rubygems config) that will
work.

The error you get running chef-solo has a different cause, usually you
don't have the host file setup with the FQDN. Does 'hostname -f'
return the FQDN of this box?

HTH,
Dan DeLeo

On Friday, January 29, 2010, Alessandro Marino 
< >
 wrote:
> I get the following exception:
> $ sudo /var/lib/gems/1.8/gems/chef-0.7.16/bin/chef-solo  -c ~/solo.rb -j 
> ~/chef.json -r http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz
>
> [Thu, 14 Jan 2010 16:57:46 +0100] INFO: Starting Chef Solo 
> Run/var/lib/gems/1.8/gems/chef-0.7.16/bin/../lib/chef/node/attribute.rb:387:in
>  `method_missing': Attribute domain is not defined! (ArgumentError)
>
>         from 
> /var/lib/gems/1.8/gems/chef-0.7.16/bin/../lib/chef/node.rb:238:in `send'    
>     from /var/lib/gems/1.8/gems/chef-0.7.16/bin/../lib/chef/node.rb:238:in 
> `method_missing'        from 
> /tmp/chef-solo/cookbooks/bootstrap/attributes/bootstrap.rb:49:in `from_file'
>
>         from 
> /var/lib/gems/1.8/gems/chef-0.7.16/bin/../lib/chef/cookbook.rb:78:in 
> `load_attributes'
> So I tried with:
> $ /var/lib/gems/1.8/gems/ohai-0.3.6/bin/ohai -v
>
> /var/lib/gems/1.8/gems/ohai-0.3.6/bin/../lib/ohai/config.rb:19:in 
> `require': no such file to load -- mixlib/config (LoadError)        from 
> /var/lib/gems/1.8/gems/ohai-0.3.6/bin/../lib/ohai/config.rb:19
>
>         from /var/lib/gems/1.8/gems/ohai-0.3.6/bin/../lib/ohai.rb:22:in 
> `require'        from 
> /var/lib/gems/1.8/gems/ohai-0.3.6/bin/../lib/ohai.rb:22        from 
> /var/lib/gems/1.8/gems/ohai-0.3.6/bin/../lib/ohai/application.rb:18:in 
> `require'
>
>         from 
> /var/lib/gems/1.8/gems/ohai-0.3.6/bin/../lib/ohai/application.rb:18        
> from /var/lib/gems/1.8/gems/ohai-0.3.6/bin/ohai:23:in `require'        from 
> /var/lib/gems/1.8/gems/ohai-0.3.6/bin/ohai:23
>
>
> It's strange it seems that mixlib library isn't installed even if it is.I 
> tried to verify the gem repository, but it seems ok:
> $ gem list mixlib
> *** LOCAL GEMS ***
> mixlib-cli (1.0.4)mixlib-config (1.0.12)mixlib-log (1.0.3)
> $ gem contents mixlib-configLICENSEREADME.rdoc
>
> RakefileVERSION.ymllib/mixlib/config.rbspec/mixlib/config_spec.rbspec/spec.optsspec/spec_helper.rb
> Do I need to check something else in order to solve the problem?
>
>
> Thanks and regards,Alessandro
>



Archive powered by MHonArc 2.6.16.

§