jkeiser / knife-essentials

Knife commands to treat the Chef server like a filesystem
Apache License 2.0
81 stars 26 forks source link

versioned_cookbooks not working #93

Closed laghoule closed 11 years ago

laghoule commented 11 years ago

I'm running version 0.9.8 with knife version 11.4.4 against chef-server 10.0.24. Everything work, except versioned cookbooks.

My knife config: repo_mode "everything" node_name "chef-webui" versioned_cookbooks true chef_server_url "http://XXX.XXX.com:4000" client_key "~/.chef/chef-webui.pem" cookbook_path "~/cookbooks"

I'm trying to upgrade from chef 10 to chef 11.

laghoule commented 11 years ago

Tried with CentOS 6.4 and Debian Squeeze.

jkeiser commented 11 years ago

What does it do when you try? Can you run it with -VV and paste the output?

laghoule commented 11 years ago

DEBUG: No chefignore file found at /root/cookbooks/chefignore no files will be ignored DEBUG: Signing the request as chef-webui DEBUG: Sending HTTP Request via GET to server.com:4000/cookbooks DEBUG: ---- HTTP Status and Header Data: ---- DEBUG: HTTP 1.1 200 OK DEBUG: content-type: application/json; charset=utf-8 DEBUG: connection: close DEBUG: server: thin 1.2.11 codename Bat-Shit Crazy DEBUG: ---- End HTTP Status/Header Data ---- Created api-tkc/ DEBUG: Signing the request as chef-webui DEBUG: Sending HTTP Request via GET to server.com:4000/cookbooks/api-tkc/_latest DEBUG: ---- HTTP Status and Header Data: ---- DEBUG: HTTP 1.1 200 OK DEBUG: content-type: application/json; charset=utf-8 DEBUG: connection: close DEBUG: server: thin 1.2.11 codename Bat-Shit Crazy DEBUG: ---- End HTTP Status/Header Data ---- Created api-tkc/attributes/ DEBUG: Signing the request as chef-webui DEBUG: Sending HTTP Request via GET to server.com:4000/cookbooks/api-tkc/0.1.3/files/d7efa17828a3591097bbfb17081429f2 DEBUG: ---- HTTP Status and Header Data: ---- DEBUG: HTTP 1.1 200 OK DEBUG: content-type: application/octet-stream DEBUG: content-transfer-encoding: binary DEBUG: content-disposition: attachment; filename="d7efa17828a3591097bbfb17081429f2" DEBUG: connection: close DEBUG: server: thin 1.2.11 codename Bat-Shit Crazy DEBUG: ---- End HTTP Status/Header Data ---- WARN: Expected JSON response, but got content-type 'application/octet-stream' Created api-tkc/attributes/default.rb Created api-tkc/recipes/ DEBUG: Signing the request as chef-webui DEBUG: Sending HTTP Request via GET to server.com:4000/cookbooks/api-tkc/0.1.3/files/d410093b947f09c2055d91482e95df4c DEBUG: ---- HTTP Status and Header Data: ---- DEBUG: HTTP 1.1 200 OK DEBUG: content-type: application/octet-stream DEBUG: content-transfer-encoding: binary DEBUG: content-disposition: attachment; filename="d410093b947f09c2055d91482e95df4c" DEBUG: connection: close DEBUG: server: thin 1.2.11 codename Bat-Shit Crazy DEBUG: ---- End HTTP Status/Header Data ---- WARN: Expected JSON response, but got content-type 'application/octet-stream' Created api-tkc/recipes/default.rb Created api-tkc/templates/ Created api-tkc/templates/default/ DEBUG: Signing the request as chef-webui DEBUG: Sending HTTP Request via GET to server.com:4000/cookbooks/api-tkc/0.1.3/files/cf8b427faedeb29127715b1794abd20c DEBUG: ---- HTTP Status and Header Data: ---- DEBUG: HTTP 1.1 200 OK DEBUG: content-type: application/octet-stream DEBUG: content-transfer-encoding: binary DEBUG: content-disposition: attachment; filename="cf8b427faedeb29127715b1794abd20c" DEBUG: connection: close DEBUG: server: thin 1.2.11 codename Bat-Shit Crazy DEBUG: ---- End HTTP Status/Header Data ---- WARN: Expected JSON response, but got content-type 'application/octet-stream' Created api-tkc/templates/default/api-tkc.conf.erb DEBUG: Signing the request as chef-webui DEBUG: Sending HTTP Request via GET to server.com:4000/cookbooks/api-tkc/0.1.3/files/f94048f0e33959e8a5e59f05307fc643 DEBUG: ---- HTTP Status and Header Data: ---- DEBUG: HTTP 1.1 200 OK DEBUG: content-type: application/octet-stream DEBUG: content-transfer-encoding: binary DEBUG: content-disposition: attachment; filename="f94048f0e33959e8a5e59f05307fc643" DEBUG: connection: close DEBUG: server: thin 1.2.11 codename Bat-Shit Crazy DEBUG: ---- End HTTP Status/Header Data ---- WARN: Expected JSON response, but got content-type 'application/octet-stream' Created api-tkc/templates/default/base.conf.erb DEBUG: Signing the request as chef-webui DEBUG: Sending HTTP Request via GET to server.com:4000/cookbooks/api-tkc/0.1.3/files/6f196a545398de85a5bf435f0fbf621b DEBUG: ---- HTTP Status and Header Data: ---- DEBUG: HTTP 1.1 200 OK DEBUG: content-type: application/octet-stream DEBUG: content-transfer-encoding: binary DEBUG: content-disposition: attachment; filename="6f196a545398de85a5bf435f0fbf621b" DEBUG: connection: close DEBUG: server: thin 1.2.11 codename Bat-Shit Crazy DEBUG: ---- End HTTP Status/Header Data ---- WARN: Expected JSON response, but got content-type 'application/octet-stream' Created api-tkc/templates/default/s3cfg.erb Created api-tkc/files/ Created api-tkc/files/debian/ DEBUG: Signing the request as chef-webui DEBUG: Sending HTTP Request via GET to server.com:4000/cookbooks/api-tkc/0.1.3/files/fd1da3187eaa6de7707d733ba7547744 DEBUG: ---- HTTP Status and Header Data: ---- DEBUG: HTTP 1.1 200 OK DEBUG: content-type: application/octet-stream DEBUG: content-transfer-encoding: binary DEBUG: content-disposition: attachment; filename="fd1da3187eaa6de7707d733ba7547744" DEBUG: connection: close DEBUG: server: thin 1.2.11 codename Bat-Shit Crazy DEBUG: ---- End HTTP Status/Header Data ---- WARN: Expected JSON response, but got content-type 'application/octet-stream' Created api-tkc/files/debian/rc.local Created api-tkc/files/redhat-6/ DEBUG: Signing the request as chef-webui DEBUG: Sending HTTP Request via GET to server.com:4000/cookbooks/api-tkc/0.1.3/files/7289a70f4c36efacd3cbf6f0ff036ead DEBUG: ---- HTTP Status and Header Data: ---- DEBUG: HTTP 1.1 200 OK DEBUG: content-type: application/octet-stream DEBUG: content-transfer-encoding: binary DEBUG: content-disposition: attachment; filename="7289a70f4c36efacd3cbf6f0ff036ead" DEBUG: connection: close DEBUG: server: thin 1.2.11 codename Bat-Shit Crazy DEBUG: ---- End HTTP Status/Header Data ---- WARN: Expected JSON response, but got content-type 'application/octet-stream' Created api-tkc/files/redhat-6/tomcat6 DEBUG: Signing the request as chef-webui DEBUG: Sending HTTP Request via GET to server.com:4000/cookbooks/api-tkc/0.1.3/files/6b0dc32bbb71d5f53d45e44e1a8f0aef DEBUG: ---- HTTP Status and Header Data: ---- DEBUG: HTTP 1.1 200 OK DEBUG: content-type: application/octet-stream DEBUG: content-transfer-encoding: binary DEBUG: content-disposition: attachment; filename="6b0dc32bbb71d5f53d45e44e1a8f0aef" DEBUG: connection: close DEBUG: server: thin 1.2.11 codename Bat-Shit Crazy DEBUG: ---- End HTTP Status/Header Data ---- WARN: Expected JSON response, but got content-type 'application/octet-stream' Created api-tkc/files/redhat-6/rc.local Created api-tkc/files/centos-6/ DEBUG: Signing the request as chef-webui DEBUG: Sending HTTP Request via GET to server.com:4000/cookbooks/api-tkc/0.1.3/files/7289a70f4c36efacd3cbf6f0ff036ead DEBUG: ---- HTTP Status and Header Data: ---- DEBUG: HTTP 1.1 200 OK DEBUG: content-type: application/octet-stream DEBUG: content-transfer-encoding: binary DEBUG: content-disposition: attachment; filename="7289a70f4c36efacd3cbf6f0ff036ead" DEBUG: connection: close DEBUG: server: thin 1.2.11 codename Bat-Shit Crazy DEBUG: ---- End HTTP Status/Header Data ---- WARN: Expected JSON response, but got content-type 'application/octet-stream' Created api-tkc/files/centos-6/tomcat6 DEBUG: Signing the request as chef-webui DEBUG: Sending HTTP Request via GET to server.com:4000/cookbooks/api-tkc/0.1.3/files/6b0dc32bbb71d5f53d45e44e1a8f0aef DEBUG: ---- HTTP Status and Header Data: ---- DEBUG: HTTP 1.1 200 OK DEBUG: content-type: application/octet-stream DEBUG: content-transfer-encoding: binary DEBUG: content-disposition: attachment; filename="6b0dc32bbb71d5f53d45e44e1a8f0aef" DEBUG: connection: close DEBUG: server: thin 1.2.11 codename Bat-Shit Crazy DEBUG: ---- End HTTP Status/Header Data ---- WARN: Expected JSON response, but got content-type 'application/octet-stream' Created api-tkc/files/centos-6/rc.local Created api-tkc/files/ubuntu/ DEBUG: Signing the request as chef-webui DEBUG: Sending HTTP Request via GET to server.com:4000/cookbooks/api-tkc/0.1.3/files/fd1da3187eaa6de7707d733ba7547744 DEBUG: ---- HTTP Status and Header Data: ---- DEBUG: HTTP 1.1 200 OK DEBUG: content-type: application/octet-stream DEBUG: content-transfer-encoding: binary DEBUG: content-disposition: attachment; filename="fd1da3187eaa6de7707d733ba7547744" DEBUG: connection: close DEBUG: server: thin 1.2.11 codename Bat-Shit Crazy DEBUG: ---- End HTTP Status/Header Data ---- WARN: Expected JSON response, but got content-type 'application/octet-stream' Created api-tkc/files/ubuntu/rc.local Created api-tkc/files/default/ DEBUG: Signing the request as chef-webui DEBUG: Sending HTTP Request via GET to server.com:4000/cookbooks/api-tkc/0.1.3/files/b10c4f52a81922084d5cb8298c1cf329 DEBUG: ---- HTTP Status and Header Data: ---- DEBUG: HTTP 1.1 200 OK DEBUG: content-type: application/octet-stream DEBUG: content-transfer-encoding: binary DEBUG: content-disposition: attachment; filename="b10c4f52a81922084d5cb8298c1cf329" DEBUG: connection: close DEBUG: server: thin 1.2.11 codename Bat-Shit Crazy DEBUG: ---- End HTTP Status/Header Data ---- WARN: Expected JSON response, but got content-type 'application/octet-stream' Created api-tkc/files/default/mysql-setup.sh DEBUG: Signing the request as chef-webui DEBUG: Sending HTTP Request via GET to server.com:4000/cookbooks/api-tkc/0.1.3/files/dc2eb4fed10276a7355690489060b475 DEBUG: ---- HTTP Status and Header Data: ---- DEBUG: HTTP 1.1 200 OK DEBUG: content-type: application/octet-stream DEBUG: content-transfer-encoding: binary DEBUG: content-disposition: attachment; filename="dc2eb4fed10276a7355690489060b475" DEBUG: connection: close DEBUG: server: thin 1.2.11 codename Bat-Shit Crazy DEBUG: ---- End HTTP Status/Header Data ---- WARN: Expected JSON response, but got content-type 'application/octet-stream' Created api-tkc/files/default/deploy-catalog.sh DEBUG: Signing the request as chef-webui DEBUG: Sending HTTP Request via GET to server.com:4000/cookbooks/api-tkc/0.1.3/files/6877f2ade05806d127843597fca8c685 DEBUG: ---- HTTP Status and Header Data: ---- DEBUG: HTTP 1.1 200 OK DEBUG: content-type: application/octet-stream DEBUG: content-transfer-encoding: binary DEBUG: content-disposition: attachment; filename="6877f2ade05806d127843597fca8c685" DEBUG: connection: close DEBUG: server: thin 1.2.11 codename Bat-Shit Crazy DEBUG: ---- End HTTP Status/Header Data ---- WARN: Expected JSON response, but got content-type 'application/octet-stream' Created api-tkc/files/default/deploy-war.sh DEBUG: Signing the request as chef-webui DEBUG: Sending HTTP Request via GET to server.com:4000/cookbooks/api-tkc/0.1.3/files/5cedb9330b83149989de0eb16cc2ce55 DEBUG: ---- HTTP Status and Header Data: ---- DEBUG: HTTP 1.1 200 OK DEBUG: content-type: application/octet-stream DEBUG: content-transfer-encoding: binary DEBUG: content-disposition: attachment; filename="5cedb9330b83149989de0eb16cc2ce55" DEBUG: connection: close DEBUG: server: thin 1.2.11 codename Bat-Shit Crazy DEBUG: ---- End HTTP Status/Header Data ---- WARN: Expected JSON response, but got content-type 'application/octet-stream' Created api-tkc/files/default/mysql-update.sh DEBUG: Signing the request as chef-webui DEBUG: Sending HTTP Request via GET to server.com:4000/cookbooks/api-tkc/0.1.3/files/c69c8f10671dfb0bd448c49f5d528122 DEBUG: ---- HTTP Status and Header Data: ---- DEBUG: HTTP 1.1 200 OK DEBUG: content-type: application/octet-stream DEBUG: content-transfer-encoding: binary DEBUG: content-disposition: attachment; filename="c69c8f10671dfb0bd448c49f5d528122" DEBUG: connection: close DEBUG: server: thin 1.2.11 codename Bat-Shit Crazy DEBUG: ---- End HTTP Status/Header Data ---- WARN: Expected JSON response, but got content-type 'application/octet-stream' Created api-tkc/files/default/iptables DEBUG: Signing the request as chef-webui DEBUG: Sending HTTP Request via GET to server.com:4000/cookbooks/api-tkc/0.1.3/files/c04fe5baa2a9d2d1d9587c6a9e5f76dc DEBUG: HTTP 1.1 200 OK DEBUG: content-type: application/octet-stream DEBUG: content-transfer-encoding: binary DEBUG: content-disposition: attachment; filename="c04fe5baa2a9d2d1d9587c6a9e5f76dc" DEBUG: connection: close DEBUG: server: thin 1.2.11 codename Bat-Shit Crazy DEBUG: ---- End HTTP Status/Header Data ---- WARN: Expected JSON response, but got content-type 'application/octet-stream' Created api-tkc/files/default/download-war.sh DEBUG: Signing the request as chef-webui DEBUG: Sending HTTP Request via GET to server.com:4000/cookbooks/api-tkc/0.1.3/files/478b9ff2f6cbf29693ff07948e1a87f0 DEBUG: ---- HTTP Status and Header Data: ---- DEBUG: HTTP 1.1 200 OK DEBUG: content-type: application/octet-stream DEBUG: content-transfer-encoding: binary DEBUG: content-disposition: attachment; filename="478b9ff2f6cbf29693ff07948e1a87f0" DEBUG: connection: close DEBUG: server: thin 1.2.11 codename Bat-Shit Crazy DEBUG: ---- End HTTP Status/Header Data ---- WARN: Expected JSON response, but got content-type 'application/octet-stream' Created api-tkc/files/default/mysql-remove.sh DEBUG: Signing the request as chef-webui DEBUG: Sending HTTP Request via GET to server.com:4000/cookbooks/api-tkc/0.1.3/files/6e21094b7a920e374e7261f50e9c4eef DEBUG: ---- HTTP Status and Header Data: ---- DEBUG: HTTP 1.1 200 OK DEBUG: content-type: application/octet-stream DEBUG: content-transfer-encoding: binary DEBUG: content-disposition: attachment; filename="6e21094b7a920e374e7261f50e9c4eef" DEBUG: connection: close DEBUG: server: thin 1.2.11 codename Bat-Shit Crazy DEBUG: ---- End HTTP Status/Header Data ---- WARN: Expected JSON response, but got content-type 'application/octet-stream' Created api-tkc/README.md DEBUG: Signing the request as chef-webui DEBUG: Sending HTTP Request via GET to server.com:4000/cookbooks/api-tkc/0.1.3/files/1a1a52ec6933407b729898a04610fad2 DEBUG: ---- HTTP Status and Header Data: ---- DEBUG: HTTP 1.1 200 OK DEBUG: content-type: application/octet-stream DEBUG: content-transfer-encoding: binary DEBUG: content-disposition: attachment; filename="1a1a52ec6933407b729898a04610fad2" DEBUG: connection: close DEBUG: server: thin 1.2.11 codename Bat-Shit Crazy DEBUG: ---- End HTTP Status/Header Data ---- WARN: Expected JSON response, but got content-type 'application/octet-stream' Created api-tkc/metadata.rb DEBUG: Signing the request as chef-webui DEBUG: Sending HTTP Request via GET to server.com:4000/cookbooks/api-tkc/0.1.3/files/79dd51a66b699a1dcba014a1b5efb2da DEBUG: ---- HTTP Status and Header Data: ---- DEBUG: HTTP 1.1 200 OK DEBUG: content-type: application/octet-stream DEBUG: content-transfer-encoding: binary DEBUG: content-disposition: attachment; filename="79dd51a66b699a1dcba014a1b5efb2da" DEBUG: connection: close DEBUG: server: thin 1.2.11 codename Bat-Shit Crazy DEBUG: ---- End HTTP Status/Header Data ---- WARN: Expected JSON response, but got content-type 'application/octet-stream' Created api-tkc/CHANGELOG.md

laghoule commented 11 years ago

It just download the latest release.

jkeiser commented 11 years ago

Oh hey! I have a suggestion. Do a gem uninstall on all older versions of knife-essentials. It could be you have a prior version and Chef 11 is picking that one up instead :/

laghoule commented 11 years ago

I have made a fresh install on a Ubuntu VM.

gem install chef gem install knife-essentials

user@ubuntu:~/.chef# gem list

* LOCAL GEMS *

chef (11.4.4) erubis (2.7.0) highline (1.6.18) ipaddress (0.8.0) json (1.7.7) knife-essentials (0.9.8) mime-types (1.23) mixlib-authentication (1.3.0) mixlib-cli (1.3.0) mixlib-config (1.1.2) mixlib-log (1.6.0) mixlib-shellout (1.1.0) net-ssh (2.6.7) net-ssh-gateway (1.2.0) net-ssh-multi (1.1) ohai (6.16.0) rest-client (1.6.7) systemu (2.5.2) yajl-ruby (1.1.0)

knife.rb config: repo_mode "everything" node_name "chef-webui" versioned_cookbooks true chef_server_url "http://XXX.XXX.com:4000" client_key "~/.chef/chef-webui.pem" cookbook_path "~/cookbooks"

and a test of knife give me:

user@ubuntu:~/.chef# knife cookbook list /var/lib/gems/1.8/gems/chef-11.4.4/lib/chef/knife/show.rb:6: superclass mismatch for class Show (TypeError) from /var/lib/gems/1.8/gems/chef-11.4.4/lib/chef/knife/core/subcommand_loader.rb:37:in load' from /var/lib/gems/1.8/gems/chef-11.4.4/lib/chef/knife/core/subcommand_loader.rb:37:inload_commands' from /var/lib/gems/1.8/gems/chef-11.4.4/lib/chef/knife/core/subcommand_loader.rb:37:in each' from /var/lib/gems/1.8/gems/chef-11.4.4/lib/chef/knife/core/subcommand_loader.rb:37:inload_commands' from /var/lib/gems/1.8/gems/chef-11.4.4/lib/chef/knife.rb:119:in load_commands' from /var/lib/gems/1.8/gems/chef-11.4.4/lib/chef/knife.rb:167:inrun' from /var/lib/gems/1.8/gems/chef-11.4.4/lib/chef/application/knife.rb:123:in run' from /var/lib/gems/1.8/gems/chef-11.4.4/bin/knife:25 from /usr/local/bin/knife:19:inload' from /usr/local/bin/knife:19

without knife-essentials plugins, it work fine.

jkeiser commented 11 years ago

Hrrrgh. Ubuntu 10.04 or 12.04? Thanks for the detailed report, sorry for all this trouble :/ I'm bringing up a new VM to verify. Meantime, what are you seeing for gem list knife-essentials on the original VM? I ask because I'm not seeing the same behavior you are (which doesn't mean I haven't typed something wrong, of course).

laghoule commented 11 years ago

Ubuntu 12.04. It was a fresh install, with no gem install. Here are my history:

1  apt-get update
2  apt-get upgrade
3  apt-get dist-upgrade
4  dmesg
5  debo
6  halt
7  ifconfig
8  apt-get update; apt-get  upgrade
9  apt-get dist-upgrade

10 gem 11 apt-get install rubygems 12 gem install chef 13 gem list 14 knife 15 gem install knife-essentials 16 knife 17 mkdir .chef 18 ls -la 19 cd .chef/ 20 ls 21 ls -la 22 vi knife.rb 23 vi chef-webui.pem 24 ls -la 25 chmod 400 chef-webui.pem 26 ls -al 27 vi knife.rb 28 vi /etc/hosts 29 vi knife.rb 30 knife cookbook list 31 gem list 32 gem 33 gem help 34 man gem 35 gem -h 36 gem list 37 gem uninstall knife-essentials 38 knife 39 knife cookbook list 40 dmesg 41 gem install knife-essentials 42 knife cookbook list 43 gem list 44 history | grep gem 45 car knife.rb 46 cat knife.rb 47 knife cookbook list 48 history

jkeiser commented 11 years ago

Thanks. I can repro. I'm confirming here, but I have a hunch this is a ruby 1.8.7 thing. I'm installing ruby 1.9.1 on my VM to see if it gets better.

laghoule commented 11 years ago

I will make the same test on CentOS 6.4 and Debian Squeeze. I will report my result.

jkeiser commented 11 years ago

Were you running ruby 1.8.7 on the vagrant box?

laghoule commented 11 years ago

Yes, on CentOS 6.4 it's 1.8.7:

[chef@knife-client ~]$ rpm -qa | grep ruby- ruby-libs-1.8.7.352-10.el6_4.x86_64 ruby-irb-1.8.7.352-10.el6_4.x86_64 ruby-1.8.7.352-10.el6_4.x86_64 ruby-devel-1.8.7.352-10.el6_4.x86_64 rubygem-yajl-ruby-0.8.2-2.el6.x86_64 ruby-rdoc-1.8.7.352-10.el6_4.x86_64

jkeiser commented 11 years ago

I have verified that those issues happen on 1.8.7. I'll add a note: gem install knife-essentials can only be installed on top of chef 11 if you are on Ruby 1.9.x.

Two possible next steps here:

  1. On the original machine, see if there are multiple versions of knife-essentials. There is a bug in knife where if there are two versions of a plugin, sometimes it selects the older one :/
  2. On the new VM, try gem installing chef and knife-essentials on Ruby 1.9.
laghoule commented 11 years ago

Same error on Debian Squeeze:

user@debian:/# ./var/lib/gems/1.8/bin/knife ERROR: You need to pass a sub-command (e.g., knife SUB-COMMAND)

Usage: knife sub-command (options) -s, --server-url URL Chef Server URL -k, --key KEY API Client Key --[no-]color Use colored output, defaults to enabled -c, --config CONFIG The configuration file to use --defaults Accept default values for all questions -d, --disable-editing Do not open EDITOR, just accept the data as is -e, --editor EDITOR Set the editor to use for interactive commands -E, --environment ENVIRONMENT Set the Chef environment -F, --format FORMAT Which format to use for output -u, --user USER API Client Username --print-after Show the data after a destructive operation -V, --verbose More verbose output. Use twice for max verbosity -v, --version Show chef version -y, --yes Say yes to all prompts for confirmation -h, --help Show this message

/var/lib/gems/1.8/gems/chef-11.4.4/lib/chef/knife/diff.rb:6: superclass mismatch for class Diff (TypeError) from /var/lib/gems/1.8/gems/chef-11.4.4/lib/chef/knife/core/subcommand_loader.rb:37:in load' from /var/lib/gems/1.8/gems/chef-11.4.4/lib/chef/knife/core/subcommand_loader.rb:37:inload_commands' from /var/lib/gems/1.8/gems/chef-11.4.4/lib/chef/knife/core/subcommand_loader.rb:37:in each' from /var/lib/gems/1.8/gems/chef-11.4.4/lib/chef/knife/core/subcommand_loader.rb:37:inload_commands' from /var/lib/gems/1.8/gems/chef-11.4.4/lib/chef/knife.rb:119:in load_commands' from /var/lib/gems/1.8/gems/chef-11.4.4/lib/chef/knife.rb:139:inlist_commands' from /var/lib/gems/1.8/gems/chef-11.4.4/lib/chef/application/knife.rb:179:in print_help_and_exit' from /var/lib/gems/1.8/gems/chef-11.4.4/lib/chef/application/knife.rb:143:invalidate_and_parse_options' from /var/lib/gems/1.8/gems/chef-11.4.4/lib/chef/application/knife.rb:121:in run' from /var/lib/gems/1.8/gems/chef-11.4.4/bin/knife:25 from ./var/lib/gems/1.8/bin/knife:19:inload' from ./var/lib/gems/1.8/bin/knife:19

with ruby package:

user@debian:/# dpkg -l | grep ruby ii libruby1.8 1.8.7.302-2squeeze1 Libraries necessary to run Ruby 1.8 ii ruby1.8 1.8.7.302-2squeeze1 Interpreter of object-oriented scripting language Ruby 1.8 ii ruby1.8-dev 1.8.7.302-2squeeze1 Header files for compiling extension modules for the Ruby 1.8 ii rubygems 1.3.7-3 package management framework for Ruby libraries/applications ii rubygems1.8 1.3.7-3 package management framework for Ruby libraries/applications

jkeiser commented 11 years ago

Yeah. I think Ruby 1.9.x will get you where you need to go. Sorry for the trouble; I'll see if I can think my way out of the Ruby 1.8.7 trap.

laghoule commented 11 years ago

Ok, I will try that and report my result.

PS: just a note, all the "stable" branch of distro use ruby 1.8.7 (for now)

Thanks for your help.

jkeiser commented 11 years ago

I'm keen on getting this to work in 1.8.7, for sure.

laghoule commented 11 years ago

Just for the record... I have installed ruby (2.0.0p0 (2013-02-24 revision 39474) via rvm install, do a gem install chef and gem install knife-essential. It's now working :)

jkeiser commented 11 years ago

Yaaay! Thank goodness! I do think your original problem was that you had multiple knife-essentials. I'm going to close this issue, and do 2 things:

  1. Make an issue to fix knife-essentials+chef11+ruby1.8.7.
  2. Kick somebody to fix the issue where multiple knife-essentials versions sometimes picks the oldest.

Cool?

jkeiser commented 11 years ago
  1. https://github.com/jkeiser/knife-essentials/issues/95
  2. http://tickets.opscode.com/browse/CHEF-3255

Absolutely bug me if you have any other issues! :)