Closed tknerr closed 9 years ago
That error looks like it is coming from the underlying vagrant command which should be running out of vagrants bundle but it looks like its picking up gems from the outer bundle where you're exec'ing test-kitchen. That is probably vagrants problem since it needs to erase any ruby env options. Offhand I don't see where the problem would be in chef-dk.
Yeah, as far as I can tell, vagrant is probably not resetting the BUNDLE_GEMFILE
variable. Even if we adjust the version in ChefDK, the problem would just come back when you upgrade Vagrant. If there's a non-brittle solution for this in ChefDK, we can reopen this, but I think the best fix would have to be applied to vagrant.
This had been fixed in vagrant master a bit earlier and will come with 1.7 I guess: https://github.com/mitchellh/vagrant/commit/bb22a37ed1989403e25e889d913b512090a5737f
My Gemfile locks test-kitchen and kitchen-vagrant to a specific version:
Yes, I know that ChefDK ships with a tested set tooling, but my projects are not all aligned with ChefDK so I need to stick with Gemfiles/bundler. So I'm using ChefDK's embedded Ruby as my main ruby for Chef development, i.e. bundled gem installs should go in there.
Now when I run bundle exec kitchen test I get this error:
I could workaround it by downgrading the bundler that ships with ChefDK to 1.6.7, but since vagrant/chef is such a common use case I might be worthwhile to ship a compatible bundler out-of-the-box.
What do you think?
Environment: ChefDK 0.3.2