0

When I try to tun kitchen converge I keep getting the following error:

-----> Starting Kitchen (v1.20.0)
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ClientError
>>>>>> Message: Could not load the 'vagrant' driver from the load path. 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

[root@kitchen besclient]# chef -v
Chef Development Kit Version: 2.0.26
chef-client version: 13.2.20
delivery version: master (17c1b0fed9be4c70f69091a6d21a4cbf0df60a23)
berks version: 6.2.0
kitchen version: 1.16.0
inspec version: 1.30.0

Vagrant is installed and I was able to converge a couple of weeks ago. I have gemfile which has

source 'https://rubygems.org'

group :lint do
  gem 'foodcritic', '~> 3.0'
  gem 'rainbow', '< 2.0'
  gem 'rake'
  gem 'rubocop', '~> 0.18'
end

group :unit do
  gem 'berkshelf',  '~> 3.0.0.beta6'
  gem 'chefspec',   '~> 3.2'
end

group :kitchen_common do
  gem 'test-kitchen', '~> 1.2'
end

group :kitchen_vagrant do
  gem 'kitchen-vagrant', '~> 0.11'
end

group :kitchen_cloud do
  gem 'kitchen-digitalocean'
  gem 'kitchen-ec2'
end      
codec
  • 7,978
  • 26
  • 71
  • 127
  • Did you try reinstalling `kitchen-vagrant`? – Brandon Miller Jun 06 '18 at 11:49
  • After installing I get `STDERR: /usr/local/rvm/rubies/ruby-2.3.5/lib/ruby/site_ruby/2.3.0/rubygems.rb:271:in 'find_spec_for_exe': can't find gem vagrant (>= 0.a) (Gem::GemNotFoundException) ` I install vagrant gem using `gem install vagrant` but still I get same error. – codec Jun 06 '18 at 11:52

1 Answers1

0

We don't recommend using Bundler together with ChefDK. The latest ChefDK (3.x) makes it work marginally better, but still not a good plan. Remove the Gemfile and it should be better.

More specifically, you are locking to kitchen-vagrant 0.x in there, which is very old and doens't work anymore (vagrant is no longer a gem, it's a standalone installers).

coderanger
  • 52,400
  • 4
  • 52
  • 75