-
Notifications
You must be signed in to change notification settings - Fork 170
Cannot load such file -- chef/encrypted_data_bag_item/check_encrypted #227
Comments
I'm unable to reproduce this with a test build of 0.3.4, which we're releasing to fix some issues with 0.3.3. It should be out later today (jenkins willing), can you test it when it comes out? |
Sure, will try it out tomorrow |
@danielsdeleo I am also seeing this same error and I am running OSX Yosemite with 0.3.4 ChefDK installed |
@danielsdeleo I also see this error with ChefDK 0.3.3/0.3.4 on OSX Yosemite as well as 0.3.4 on CentOS 7. |
same error with ChefDK 0.3.4 on Debian unstable. |
Update: This breaks other things! Don't do it! Hit this with 0.3.4 on Ubuntu 14.04 Running this fixed it for me: Note, I haven't thoroughly checked that this doesn't break other things! But I'm not sure why the deb package needs 4 versions of the chef gem. |
@gh2k was just about to ask if that broke your chef command :) I'm hitting the same issue on windows and removing c:\opscode\chefdk\embedded\lib\ruby\gems\2.0.0\gems\chef-12* fixes knife, but breaks chef It seems like chef-dk depends on chef-12 and knife depends on chef-11 ? |
Is this issue exclusively for people who have upgraded from an earlier version, or is it affecting new installs as well? |
Starting up chef-shell and trying the same chef > require 'chef/encrypted_data_bag_item/check_encrypted'
LoadError: cannot load such file -- chef/encrypted_data_bag_item/check_encrypted
from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:128:in `require'
from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:39:in `require'
from (irb):1
from /opt/chefdk/embedded/apps/chef/lib/chef/shell.rb:75:in `block in start'
from /opt/chefdk/embedded/apps/chef/lib/chef/shell.rb:74:in `catch'
from /opt/chefdk/embedded/apps/chef/lib/chef/shell.rb:74:in `start'
from /opt/chefdk/embedded/apps/chef/bin/chef-shell:37:in `<top (required)>'
from /usr/bin/chef-shell:33:in `load'
from /usr/bin/chef-shell:33:in `<main>' This makes sense because the chef-shell is only version 11.16.4 - that |
Here is the output of running [~]$ chef shell-init zsh [ruby-2.1.4]
export PATH=/opt/chefdk/bin:/Users/tball/.chefdk/gem/ruby/2.1.0/bin:/opt/chefdk/embedded/bin:/Users/tball/.rvm/gems/ruby-2.1.4/bin:/Users/tball/.rvm/gems/ruby-2.1.4@global/bin:/Users/tball/.rvm/rubies/ruby-2.1.4/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/tball/.rvm/bin
export GEM_ROOT="/opt/chefdk/embedded/lib/ruby/gems/2.1.0"
export GEM_HOME=/Users/tball/.chefdk/gem/ruby/2.1.0
export GEM_PATH=/Users/tball/.chefdk/gem/ruby/2.1.0:/opt/chefdk/embedded/lib/ruby/gems/2.1.0 |
And here is my load path from another chef-shell session: chef > $:.each do |e|
chef > p e
chef ?> end
"/opt/chefdk/embedded/apps/chef/lib"
"/opt/chefdk/embedded/apps/chef/lib"
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/mixlib-log-1.6.0/lib"
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/hashie-2.1.2/lib"
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-12/2.1.0/ffi-1.9.6"
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ffi-1.9.6/lib"
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-12/2.1.0/libyajl2-1.1.0"
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/libyajl2-1.1.0/lib"
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-12/2.1.0/ffi-yajl-1.2.0"
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ffi-yajl-1.2.0/lib"
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/rack-1.5.2/lib"
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-zero-2.2.1/lib"
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/diff-lcs-1.2.5/lib"
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/erubis-2.7.0/lib"
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/highline-1.6.21/lib"
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/mime-types-1.25.1/lib"
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/mixlib-authentication-1.3.0/lib"
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/mixlib-cli-1.5.0/lib"
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/mixlib-config-2.1.0/lib"
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/mixlib-shellout-1.6.0/lib"
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/net-ssh-2.9.1/lib"
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/net-ssh-gateway-1.2.0/lib"
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/net-ssh-multi-1.2.0/lib"
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/systemu-2.6.4/lib"
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ipaddress-0.8.0/lib"
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/wmi-lite-1.0.0/lib"
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ohai-7.4.0/lib"
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/plist-3.1.0/lib"
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/coderay-1.1.0/lib"
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/slop-3.6.0/lib"
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/method_source-0.8.2/lib"
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/pry-0.10.1/lib"
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/rest-client-1.6.7/lib"
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/rdoc-4.1.2/lib"
"/opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0"
"/opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/x86_64-darwin12.0"
"/opt/chefdk/embedded/lib/ruby/site_ruby"
"/opt/chefdk/embedded/lib/ruby/vendor_ruby/2.1.0"
"/opt/chefdk/embedded/lib/ruby/vendor_ruby/2.1.0/x86_64-darwin12.0"
"/opt/chefdk/embedded/lib/ruby/vendor_ruby"
"/opt/chefdk/embedded/lib/ruby/2.1.0"
"/opt/chefdk/embedded/lib/ruby/2.1.0/x86_64-darwin12.0" None of those locations include the file in question, which can be seen in the following locations: [~]$ sudo find /opt/chefdk -depth -name 'check_encrypted.rb'
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/bundler/gems/chef-136fe8af2e37/lib/chef/encrypted_data_bag_item/check_encrypted.rb
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.0.0.rc.0/lib/chef/encrypted_data_bag_item/check_encrypted.rb
|
Starting up a pry session, breaking at https://github.com/opscode/chef/blob/master/lib/chef/knife/core/subcommand_loader.rb#L35 and checking the ouput of ...
"/opt/chefdk/embedded/apps/chef/lib/chef/knife/user_list.rb",
"/opt/chefdk/embedded/apps/chef/lib/chef/knife/user_reregister.rb",
"/opt/chefdk/embedded/apps/chef/lib/chef/knife/user_show.rb",
"/opt/chefdk/embedded/apps/chef/lib/chef/knife/xargs.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.0.0.rc.0/lib/chef/knife/data_bag_secret_options.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-vault-2.2.4/lib/chef/knife/decrypt.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-vault-2.2.4/lib/chef/knife/encrypt_create.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-vault-2.2.4/lib/chef/knife/encrypt_delete.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-vault-2.2.4/lib/chef/knife/encrypt_remove.rb",
... So now my question is why does knife find that one file from chef-12 and none of the other knife files? |
It is the In trying to evaluate @danielsdeleo do you have a |
I temporarily got around the problem by putting the following in a {
"plugins": {
"knife": {
"paths": [
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-vault-2.2.4/lib/chef/knife/decrypt.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-vault-2.2.4/lib/chef/knife/encrypt_create.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-vault-2.2.4/lib/chef/knife/encrypt_delete.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-vault-2.2.4/lib/chef/knife/encrypt_remove.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-vault-2.2.4/lib/chef/knife/encrypt_rotate_keys.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-vault-2.2.4/lib/chef/knife/encrypt_update.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-vault-2.2.4/lib/chef/knife/vault_admins.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-vault-2.2.4/lib/chef/knife/vault_base.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-vault-2.2.4/lib/chef/knife/vault_create.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-vault-2.2.4/lib/chef/knife/vault_decrypt.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-vault-2.2.4/lib/chef/knife/vault_delete.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-vault-2.2.4/lib/chef/knife/vault_edit.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-vault-2.2.4/lib/chef/knife/vault_refresh.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-vault-2.2.4/lib/chef/knife/vault_remove.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-vault-2.2.4/lib/chef/knife/vault_rotate_all_keys.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-vault-2.2.4/lib/chef/knife/vault_rotate_keys.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-vault-2.2.4/lib/chef/knife/vault_show.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-vault-2.2.4/lib/chef/knife/vault_update.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/knife-spork-1.4.1/lib/chef/knife/spork-bump.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/knife-spork-1.4.1/lib/chef/knife/spork-check.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/knife-spork-1.4.1/lib/chef/knife/spork-databag-create.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/knife-spork-1.4.1/lib/chef/knife/spork-databag-delete.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/knife-spork-1.4.1/lib/chef/knife/spork-databag-edit.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/knife-spork-1.4.1/lib/chef/knife/spork-databag-fromfile.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/knife-spork-1.4.1/lib/chef/knife/spork-environment-check.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/knife-spork-1.4.1/lib/chef/knife/spork-environment-create.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/knife-spork-1.4.1/lib/chef/knife/spork-environment-delete.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/knife-spork-1.4.1/lib/chef/knife/spork-environment-edit.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/knife-spork-1.4.1/lib/chef/knife/spork-environment-fromfile.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/knife-spork-1.4.1/lib/chef/knife/spork-info.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/knife-spork-1.4.1/lib/chef/knife/spork-node-create.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/knife-spork-1.4.1/lib/chef/knife/spork-node-delete.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/knife-spork-1.4.1/lib/chef/knife/spork-node-edit.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/knife-spork-1.4.1/lib/chef/knife/spork-node-fromfile.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/knife-spork-1.4.1/lib/chef/knife/spork-node-runlistadd.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/knife-spork-1.4.1/lib/chef/knife/spork-node-runlistremove.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/knife-spork-1.4.1/lib/chef/knife/spork-node-runlistset.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/knife-spork-1.4.1/lib/chef/knife/spork-omni.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/knife-spork-1.4.1/lib/chef/knife/spork-promote.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/knife-spork-1.4.1/lib/chef/knife/spork-role-create.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/knife-spork-1.4.1/lib/chef/knife/spork-role-delete.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/knife-spork-1.4.1/lib/chef/knife/spork-role-edit.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/knife-spork-1.4.1/lib/chef/knife/spork-role-fromfile.rb",
"/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/knife-spork-1.4.1/lib/chef/knife/spork-upload.rb"
]
}
}
} |
Thanks @tyler-ball, that worked for me |
@tyler-ball yep, that's why I couldn't repro 😞 |
Thanks @tyler-ball , worked for me as well |
The fix for this is committed to chef here: chef/chef#2416 (corresponding PR for master is here: chef/chef#2422 ). I've made a test build of ChefDK and confirmed the fix, we just need to check it on Windows and then we'll kick off a release build. |
I have run into the same issue on Windows when following the chef tutorials for Windows Server.
Spits out this error
|
Thanks @tyler-ball. To workaround this issue with Chefdk 0.3.3 on Windows, my plugin_manifest.json file looks like:
|
I ended up deleting |
Thanks Simon From: Simon Detheridge [mailto:notifications@github.com] I ended up deleting data_bag_secret_options.rb. It was easier than writing out a plugin manifest that included all of my additional knife plugins. It's not usable anyway, in this version. — The University of Derby has a published policy regarding email and reserves the right to monitor email traffic. If you believe this was sent to you in error, please select unsubscribe. Unsubscribe and Security information contact: infosec@derby.ac.uk |
@danielsdeleo has the fix packaged already - thanks for the quick turnaround! Everyone who has 0.3.4 or 0.3.3 installed can uninstall it and install 0.3.5 (fixed version) from https://downloads.getchef.com/chef-dk/ Don't forget to remove your |
BTW, the plugin_manifest can make knife more performant, but it's kind of a PITA if you're frequently installing or upgrading your knife plugins, so you don't have to remove it, but be aware that you have to manually update it when you install new plugins. |
Using chefdk 0.3.3 I get the following error whenever I try to run a knife command
This does not happen on 0.3.2.
I'm running 64bit Ubuntu 14.04 with the chefdk package from the web. Chef server is on hosted chef.
The text was updated successfully, but these errors were encountered: