无法从加载路径 Test Kitchen 加载 'vagrant' 驱动程序,无法下载新版本

Could not load the 'vagrant' driver from the load path Test Kitchen, downloading new versions doesn't work

当我尝试在终端上 运行 kitchen test 时,我收到了

>>>>>> ------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

我发现了一个 git 问题,据说要为 kitchen-vag运行t 回滚到 0.16.0,所以我做了,但没有任何改变。我安装了最新版本的 kitchen-vag运行t gem,得到了这个:

>>>>>> ------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

然后我去vag运行ts网站,下载了安装程序,安装了它,删除了所有的gem,然后又运行,我得到了第一个再次出错。

我在 ~/chef-repo/cookbooks/mycookbook 目录中 运行 'kitchen create' 时遇到了同样的错误。

我在 macOS 终端 window 中通过 运行 以下命令解决了它 window。

$ gem install kitchen-vagrant

(如果需要,请在命令中添加 sudo。)