When I try to run kitchen test
on terminal I'm greeted with
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ClientError
>>>>>> Message: Could not load the 'vagrant' driver from the load path. Did you mean: dummy, exec, proxy ? Please ensure that your driver is installed as a gem or included in your Gemfile if using Bundler.
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration
I found a git problem that said to roll back to 0.16.0 for kitchen-vagrant, so I did and that didn't change anything. I installed the newest version of the kitchen-vagrant gem, and got this:
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ShellOut::ShellCommandFailed
>>>>>> Message: Expected process to exit with [0], but received '1'
---- Begin output of vagrant --version ----
STDOUT:
STDERR: Thanks for wanting to use Vagrant! Unfortunately, this is not the way
to install Vagrant anymore. We now make installers for the various operating
systems Vagrant supports.
Vagrant is no longer distributed as a RubyGem. Please download the latest
version for your operating system from the URL below. If you still wish
to use the RubyGem version, you can manually install version 1.0.7. Note that
the RubyGem version hasn't been updated in over a year and will no longer
receive any updates.
Prior to installing Vagrant using the installer, make sure you uninstall
all your Vagrant gems, since they sometimes conflict.
http://www.vagrantup.com
If you want to learn more about why we don't distribute using RubyGems
anymore, please read this: http://mitchellh.com/abandoning-rubygems
---- End output of vagrant --version ----
Ran vagrant --version returned 1
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration
So then I went to vagrants website, downloaded the installer, installed it, removed all the gems, and ran it again, and I got the first error again.
I faced the same error when I ran 'kitchen create' in ~/chef-repo/cookbooks/mycookbook
directory.
I resolved it by running the following command in my macOS Terminal window.
$ gem install kitchen-vagrant
(Add sudo
to the command if required.)