paulczar / meez

rubygem to set up opinionated TDD chef cookbook
73 stars 17 forks source link

Generated cookbook's gemfile has unresolvable dependencies in ChefDK 0.2.0 #20

Open sciurus opened 10 years ago

sciurus commented 10 years ago

I have what I think is a pretty vanilla ChefDK 0.2.0 installation.

$ eval "$(chef shell-init bash)"
$ meez --version
meez version 0.2.2
$ chef --version
Chef Development Kit Version: 0.2.0
$ which ruby ; which gem ; which bundle
/opt/chefdk/embedded/bin/ruby
/opt/chefdk/embedded/bin/gem
/opt/chefdk/embedded/bin/bundle

I ran bundle install to see if the cookbook structure generated by meez had any dependencies that weren't provided by ChefDK. That resilted in the following error:

$ bundle install
Fetching gem metadata from https://rubygems.org/.......
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "rspec":
  In Gemfile:
    serverspec (>= 1.10) ruby depends on
      rspec (~> 2.99) ruby

    chefspec (> 4) ruby depends on
      rspec (3.0.0)

Bundler could not find compatible versions for gem "foodcritic":
  In Gemfile:
    guard-foodcritic (>= 1.0.2) ruby depends on
      foodcritic (< 4.0, >= 1.3) ruby

    foodcritic (4.0.0)
rberger commented 10 years ago

Having the same problem with chef-dk 0.2.1. Is there a reason why its creating a Gemfile with so many constraints? Why not have it just ride against the constraints that will come out of the Chef-DK installed base gems?

paulczar commented 10 years ago

I was running into issues with not enough constraints and having upstream packages constantly breaking me. This might have been pre-chefdk though. I should reevaluate the constraints I have.

paulczar commented 10 years ago

Hopefully this is fixed is newest version. I've relaxed most of the dependency versions on the assumption that chefdk has already got set versions installed.