1

Walking through this chef-solo tutorial, I ran into a problem after running chef solo init .. Using CentOS 6.5 VM on vagrant, I'm using chef-11.10.4-1.el6.x86_64.rpm. I installed knife-solo via sudo gem install knife-solo.

[vagrant@vagrant-centos65 chef-solo-example]$ ls
cookbooks  data_bags  environments  Gemfile  Gemfile.lock  nodes  roles  
 site-cookbooks

[vagrant@vagrant-centos65 chef-solo-example]$ librarian-chef init create Cheffile
/usr/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:298:in `to_specs': Could not 
         find 'librarian-chef' (>= 0) among 30 total gem(s) (Gem::LoadError)
        from /usr/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:309:in `to_spec'
        from /usr/lib/ruby/site_ruby/1.8/rubygems/core_ext/kernel_gem.rb:53:in 
               `gem'
        from /usr/bin/librarian-chef:18

I saw a similar problem here, so I re-ran sudo gem install bundler --no-ri --no-rdoc , but I still ran into the same problem.

Community
  • 1
  • 1
Kevin Meredith
  • 41,036
  • 63
  • 209
  • 384

1 Answers1

3

You need to install librarian-chef:

sudo gem install librarian-chef

If you don't have installed gem so far, you'll also need to install rubygems before:

sudo yum install rubygems
hek2mgl
  • 152,036
  • 28
  • 249
  • 266