You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.
When using ChefDK with Vagrant, if I have a Compass config.rb file in my project directory, Berks tries to read it and fails:
The following berks command failed to execute:
/usr/local/bin/berks --version --format json
The stdout and stderr are shown below:
stdout:
stderr: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/httpclient-2.6.0.1/lib/httpclient/webagent-cookie.rb:458: warning: already initialized constant HTTPClient::CookieManager
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/httpclient-2.6.0.1/lib/httpclient/cookie.rb:8: warning: previous definition of CookieManager was here
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-config-12.7.2/lib/chef-config/workstation_config_loader.rb:159:in `rescue in read_config': You have an error in your config file /Volumes/Projects/ripetungi/saint-cooks/site/config.rb (ChefConfig::ConfigurationError)LoadError: cannot load such file -- zen-grids /Volumes/Projects/ripetungi/saint-cooks/site/config.rb:13:in `from_string'Relevant file content: 12: 13: require 'zen-grids' 14: from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-config-12.7.2/lib/chef-config/workstation_config_loader.rb:138:in `read_config' from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-config-12.7.2/lib/chef-config/workstation_config_loader.rb:73:in `load'
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ridley-4.4.2/lib/ridley/chef/config.rb:13:in `initialize' from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.2.0/lib/berkshelf.rb:90:in `new' from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.2.0/lib/berkshelf.rb:90:in `chef_config' from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.2.0/lib/berkshelf/config.rb:80:in `<class:Config>'
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.2.0/lib/berkshelf/config.rb:4:in `<module:Berkshelf>' from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.2.0/lib/berkshelf/config.rb:3:in `<top (required)>' from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.2.0/lib/berkshelf/cookbook_generator.rb:3:in `require_relative' from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.2.0/lib/berkshelf/cookbook_generator.rb:3:in `<class:CookbookGenerator>'
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.2.0/lib/berkshelf/cookbook_generator.rb:2:in `<module:Berkshelf>' from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.2.0/lib/berkshelf/cookbook_generator.rb:1:in `<top (required)>' from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.2.0/lib/berkshelf.rb:197:in `require_relative' from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.2.0/lib/berkshelf.rb:197:in `<top (required)>'
from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.2.0/lib/berkshelf/cli.rb:1:in `<top (required)>' from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.2.0/bin/berks:3:in `<top (required)>' from /usr/local/bin/berks:48:in `load' from /usr/local/bin/berks:48:in `<main>'
It appears that you are not using the ChefDK. Please note that Vagrant Berkshelf
works best when used with the ChefDK, and other installation methods are not
officially supported.
Please download and install the latest version of the ChefDK from:
https://downloads.chef.io/chef-dk
and follow the installation instructions. Do not forget to add the ChefDK to
your PATH.
The file works fine with Compass and should just be ignored by Berks.
The text was updated successfully, but these errors were encountered:
Berkshelf is using the chef libs to load knife.rb or config.rb, the latter being what we've been moving to slowly. I'm not sure if there is an elegant way around this if it's in the same dir in path of lookup but setting a config.json for Berks might avoid this entirely.
When using ChefDK with Vagrant, if I have a Compass
config.rb
file in my project directory, Berks tries to read it and fails:The file works fine with Compass and should just be ignored by Berks.
The text was updated successfully, but these errors were encountered: