Kevin Meredith
Kevin Meredith

Reputation: 41939

Could not find 'librarian-chef' (Gem::LoadError)

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.

Upvotes: 1

Views: 850

Answers (1)

hek2mgl
hek2mgl

Reputation: 158190

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

Upvotes: 3

Related Questions