chef-boneyard / knife-container

DEPRECATED: Container support for Chef's Knife Command
Apache License 2.0
57 stars 11 forks source link

knife-container 0.2.1 is not compatible with chef-dk 0.2.1? #34

Closed joegoggins closed 10 years ago

joegoggins commented 10 years ago

Hi there,

It looks like the knife-container has chef 11.x pinned in the gemspec, whereas the chef-dk requires chef 12.alpha pinned and thus I get a Unable to activate knife-container-0.2.1, because chef-12.0.0.alpha.1 conflicts with chef (~> 11.0) I suppose I'll downgrade chef-dk to 0.2.0 so it'll work again... or perhaps I'm doing something wrong. Here's what I did:

~$ chef -v
Chef Development Kit Version: 0.2.1
~$ chef gem install knife-container
Successfully installed knife-container-0.2.1
1 gem installed
~$ which chef
/opt/chefdk/bin/chef
~$ which knife
/opt/chefdk/bin/knife
~$ which ruby
/opt/chefdk/embedded/bin/ruby
~$ knife container
/opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:2064:in `raise_if_conflicts': Unable to activate knife-container-0.2.1, because chef-12.0.0.alpha.1 conflicts with chef (~> 11.0) (Gem::LoadError)
  from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:1262:in `activate'
  from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems.rb:196:in `rescue in try_activate'
  from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems.rb:193:in `try_activate'
  from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:132:in `rescue in require'
  from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in `require'
  from /Users/goggins/.chefdk/gem/ruby/2.1.0/gems/knife-container-0.2.1/lib/chef/knife/container_docker_init.rb:20:in `<top (required)>'
  from /opt/chefdk/embedded/apps/chef/lib/chef/knife/core/subcommand_loader.rb:34:in `load'
  from /opt/chefdk/embedded/apps/chef/lib/chef/knife/core/subcommand_loader.rb:34:in `block in load_commands'
  from /opt/chefdk/embedded/apps/chef/lib/chef/knife/core/subcommand_loader.rb:34:in `each'
  from /opt/chefdk/embedded/apps/chef/lib/chef/knife/core/subcommand_loader.rb:34:in `load_commands'
  from /opt/chefdk/embedded/apps/chef/lib/chef/knife.rb:120:in `load_commands'
  from /opt/chefdk/embedded/apps/chef/lib/chef/knife.rb:168:in `run'
  from /opt/chefdk/embedded/apps/chef/lib/chef/application/knife.rb:139:in `run'
  from /opt/chefdk/embedded/apps/chef/bin/knife:25:in `<top (required)>'
  from /opt/chefdk/bin/knife:34:in `load'
  from /opt/chefdk/bin/knife:34:in `<main>'
scotthain commented 10 years ago

@joegoggins how did you install chefdk? Also what's your core ruby install? There's a few variables that can help troubleshoot this. Also what OS are you on?

joegoggins commented 10 years ago

"how did you install chefdk?"

I installed it through https://downloads.getchef.com/chef-dk/mac/#/ and selected 0.2.1.

"what's your core ruby install?"

Normally I use chruby + 1.9.3. But I disabled all of that first and used the instructions here: https://github.com/opscode/chef-dk#using-chefdk-as-your-primary-development-environment

It looks like the gemspec on knife-container is pinned to chef 11 here whereas chef-dk is pinned to 12 here ...

scotthain commented 10 years ago

@joegoggins nice catch, I think we have a pinning issue. @tduffield can you confirm?

tduffield commented 10 years ago

This is an issue. I was unaware that chef-dk had bumped to chef 12 alpha. I'll get a quick fix out today that will address the issue.

tduffield commented 10 years ago

knife-container v0.2.2 has been released to rubygems. It should now support chef12.

joegoggins commented 10 years ago

Cool, thanks for the rapid turnaround on this. There is so much awesome container tooling coming out like this. I also appreciate that you spell out the 1.0.0 vision in the changelog too, helps me stay stoked and tuned in.