"Kitchen list" 命令失败 "Could not load the 'ssh' transport from the load path"

"Kitchen list" command fails with "Could not load the 'ssh' transport from the load path"

我正在尝试将测试厨房添加到厨师食谱中,但出现错误 "Could not load the 'ssh' transport from the load path"。

我之前已经按照完全相同的步骤设置了一个测试厨房,没有问题,但那是在不同的机器上。

我试过了运行

gem install net-ssh 

但这似乎并不能解决问题

解决了。

我运行

gem list

给出了输出

..
net-ssh (2.10.0.beta2, 2.9.2)
..

然后我发出命令:

gem uninstall net-ssh 2.10.9.beta2

得到输出:

Select gem to uninstall:
 1. net-ssh-2.10.0.beta2
 2. net-ssh-2.9.2
 3. All versions

于是我选择了选项 1,gem 被删除,然后 运行

kitchen list

按预期工作

我 运行 在 Travis-CI 上遇到了与 Java SE Chef cookbook 相同的问题:

Chef Development Kit Version: 0.10.0
chef-client version: 12.6.0
berks version: 4.0.1
kitchen version: 1.5.0

扔这个:

-----> Starting Kitchen (v1.5.0)
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ClientError
>>>>>> Message: Could not load the 'ssh' transport from the load path. Please ensure that your transport is installed as a gem or included in your Gemfile if using Bundler.
>>>>>> ----------------------

我必须切换到 Dokken 才能让它工作: https://github.com/someara/kitchen-dokken


修复:

更新 .travis.yml 以安装 kitchen-dokken:

/opt/chefdk/embedded/bin/chef gem install kitchen-dokken

并更新 .kitchen.docker.yml 为:

transport:
  name: dokken

provisioner:
  name: dokken

verifier:
  root_path: '/opt/verifier'
  sudo: false

driver:
  name: dokken