Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run librarian-chef if Cheffile contains any git repo #21

Open
Soulou opened this issue Dec 2, 2013 · 3 comments
Open

Unable to run librarian-chef if Cheffile contains any git repo #21

Soulou opened this issue Dec 2, 2013 · 3 comments

Comments

@Soulou
Copy link

Soulou commented Dec 2, 2013

The exception

....rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:100:in `require': unable to find a version of 'chef' to activate (Gem::LoadError)
    from /home/leo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/librarian-chef-0.0.2/lib/librarian/chef/manifest_reader.rb:27:in `compile_manifest'
    from /home/leo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/librarian-chef-0.0.2/lib/librarian/chef/manifest_reader.rb:21:in `read_manifest'
    from /home/leo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/librarian-chef-0.0.2/lib/librarian/chef/source/local.rb:57:in `fetch_manifest_data'
    from /home/leo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/librarian-chef-0.0.2/lib/librarian/chef/source/local.rb:49:in `manifest_data'
    from /home/leo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/librarian-chef-0.0.2/lib/librarian/chef/source/local.rb:28:in `fetch_version'
    from /home/leo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/librarian-0.1.1/lib/librarian/manifest.rb:117:in `fetch_version!'
    from /home/leo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/librarian-0.1.1/lib/librarian/manifest.rb:109:in `fetched_version'
    from /home/leo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/librarian-0.1.1/lib/librarian/manifest.rb:55:in `version'
    from /home/leo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/librarian-0.1.1/lib/librarian/manifest.rb:93:in `satisfies?'
...

Gemfile:

source "http://rubygems.org"

gem "chef"
gem "knife-solo"
gem "librarian-chef"
gem "foodcritic"

Cheffile

site "http://community.opscode.com/api/v1"

cookbook "apt"
cookbook "build-essential"
cookbook "chef_handler"
cookbook "deploy_wrapper"
cookbook "dmg"
cookbook "docker"
cookbook "firewall"
cookbook "git"
cookbook "golang"
cookbook "logrotate"
cookbook "lxc"
cookbook "modules"
cookbook "ntp"
cookbook "nginx"
cookbook "nodejs"
cookbook "openssl"
cookbook "redisio"
cookbook "runit"
cookbook "ssh_known_hosts"
cookbook "sudo"
cookbook "windows"
cookbook "yum"

cookbook "mongodb",
  git: "https://github.com/sourceindex/chef-mongodb.git"
cookbook "rbenv",
  git: "https://github.com/fnichol/chef-rbenv"
cookbook "ruby_build",
  git: "https://github.com/fnichol/chef-ruby_build.git"

If i comment out the last three cookbooks, I've no problem by running librarian-chef update however if there is any of these, it just crashes.

Any idea ? Thanks !

@danielsand
Copy link

Hey,
just run into a similar problem.

  • first add one of the gits and check if it works.
  • if it works go on till the moment it breaks.

Look inside the not working cookbook inside metadata.rb if any cookbook is dependent and missing in your Cheffile config.
install it before checking out the not working cookbook.
should fix the problem.

had problems with an cookbook from a git repo because it was dependent on another - no real error came up.

@moteutsch
Copy link

Ditto. Happens to me too. If the dependencies in the repo's metadata.rb don't match yours, it'll hang/show error "Could not resolve the dependencies."

@schancel
Copy link

Should this line: git: "https://github.com/fnichol/chef-rbenv" be: git: "https://github.com/fnichol/chef-rbenv.git ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants