Closed jmccann closed 8 years ago
@jmccann Have you tried installing into the chefdk gem space?
chef gem install chef-vault-testfixtures
Typically chef-vault-testfixtures installs via bundler and a Gemfile, which keeps its dependencies isolated. Mark is correct that if you haven't run chef shell-init bash
prior to running gem install ...
then you might be trying to install into some other ruby install, but we use it all the time with bundler.
The idea is that if I create a cookbook that uses vault and -testfixtures, and six months later ChefDK has been upgraded, or ChefSpec or Test-Kitchen have been released with new features, you can grab my cookbook from source control, set up dependencies with bundler and be ensured of getting the same results I did no matter how long it's been since I last ran tests.
Yes, I have my env set to use ChefDK ENV by default. I also tried with gem install
and chef gem install
to make sure.
I'll continue to use Gemfiles in the case where I need to use this gem then. Was just wondering if I was missing something obvious.
Thanks for the responses and the gem! :smile:
I was curious if there is a trick to getting this to work with ChefDK. I'm running into conflicts with Hashie:
I realize I could maintain a Gemfile then
bundle install
andbundle exec
to address this but have noticed a trend of using ChefDK to avoid having to maintain gem dependencies and was wondering if there was a way to have it work here.If not are there plans have this work 'natively' with ChefDK, which to me would mean having the gem work using the core gems included in ChefDK (as in Hashie 3.4.2 which is included in ChefDK 0.9.0 to address the issue above)?
Or maybe it'd be better to ask the maintainers of ChefDK if they could pull in this additional gem into their product?
Thanks!