0
votes

It looks like following:

$chef-client --version
/opt/chef/embedded/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:774:in `block in activate_dependencies': can't satisfy 'mime-types (~> 1.16)', already activated 'mime-types-2.0' (Gem::LoadError)
    from /opt/chef/embedded/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:766:in `each'
    from /opt/chef/embedded/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:766:in `activate_dependencies'
    from /opt/chef/embedded/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:750:in `activate'
    from /opt/chef/embedded/lib/ruby/site_ruby/1.9.1/rubygems.rb:1232:in `gem'
    from /opt/chef/embedded/bin/chef-client:22:in `'

It is mean that I should reinstall ruby?or updated it? What kinds of commands should be used?

1
chef-client uses embedded ruby. how did you install chef-client? - slayedbylucifer
I'm sorry but I really forget the way I install it. May be chef was installed twice with different methods,curl and gems - kkt
I would uninstall all possible chef-client stuff and then will do a clean install. Its better that way instead of troubleshooting the existing non-healthy chef-client. - slayedbylucifer
Yes,I intended to do this, But I troubled with the what commands should be used for uninstall chef-*, Also, needn't I uninstall ruby and rubygems? - kkt
don't know about mac. on linux I would use yum/rpm (RHEL based) OR aptitude/dpkg (ubuntu based) commands to get rid of existing chef-client binaries. No, dont do anything to ruby. In all likelihood, if it is embedded one, then it will get uninstalled along with chef-client. - slayedbylucifer

1 Answers

0
votes

I guess you installed Chef through rubygems. It requires mime-types ~> 1.16, but you have 2.0 installed. You should uninstall it and install the right version.

gem uninstall mime-types
gem install mime-types -v 1.16