Does the kitchen / berkshelf want an old stone?

I want to check out some changes in the cookbook, so I did what I did, but the result was far from normal:

$ ../gem-sucks/bin/kitchen converge
-----> Starting Kitchen (v1.2.1)
!!!!!! The `berkshelf 'gem is missing and must be installed or cannot be properly activated. Run `gem install berkshelf` or add the following to your Gemfile if you are using Bundler:` gem 'berkshelf``.
>>>>>> ------ Exception -------
>>>>>> Class: Kitchen :: UserError
>>>>>> Message: Could not load or activate Berkshelf (can't activate json-1.8.0, already activated json-1.8.1)
>>>>>> ----------------------
>>>>>> Please see .kitchen / logs / kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration

$ gem list | grep berkshelf
berkshelf (3.2.1, 3.1.4, 2.0.10, 2.0.9)
berkshelf-api-client (1.2.0)
$ gem list | grep json
json (1.8.1, 1.8.0)
multi_json (1.10.1, 1.7.9)

Debian Jessie is running on the machine, and there are a lot of packages (I have no idea if something is connected with the ruby), since I touched on the last of this cookbook.

How to make a kitchen again?

0
source share
4 answers

If you use ChefDk, you can fix the problem by removing the gems installed in GEM_HOME(in my case /home/username/.chefdk).

, , bundle exec kitchen converge, .

0

, chefdk .

PATH=/opt/chefdk/bin:/Users/sowen/.rvm/gems/ruby-2.2.0/bin:/Users/sowen/.rvm/gems/ruby-2.2.0@global/bin:/Users/sowen/.rvm/rubies/ruby-2.2.0/bin:/opt/chefdk/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/sowen/go/bin:/Users/sowen/.rvm/bin:/Users/sowen/.rvm/bin:/Users/sowen/go/bin

, bash_profile

+4

, json GEM_HOME, .

gem uninstall -i /opt/chefdk/embedded/lib/ruby/gems/2.1.0 json
0

https://github.com/test-kitchen/kitchen-vagrant/pull/126

berkshelf gem, --

-

git clone https://github.com/test-kitchen/kitchen-vagrant.git
cd kitchen-vagrant
gem build kitchen-vagrant.gemspec
gem install kitchen-vagrant-0.15.0.gem

Berkshelf

gem install berkshelf
0
source

Source: https://habr.com/ru/post/1569934/


All Articles