{"action":"created","issue":{"url":"https://api.github.com/repos/sethvargo/chefspec/issues/676","repository_url":"https://api.github.com/repos/sethvargo/chefspec","labels_url":"https://api.github.com/repos/sethvargo/chefspec/issues/676/labels{/name}","comments_url":"https://api.github.com/repos/sethvargo/chefspec/issues/676/comments","events_url":"https://api.github.com/repos/sethvargo/chefspec/issues/676/events","html_url":"https://github.com/sethvargo/chefspec/issues/676","id":137382823,"number":676,"title":"resource reporting vs docker cookbook","user":{"login":"b-dean","id":3189231,"avatar_url":"https://avatars.githubusercontent.com/u/3189231?v=3","gravatar_id":"","url":"https://api.github.com/users/b-dean","html_url":"https://github.com/b-dean","followers_url":"https://api.github.com/users/b-dean/followers","following_url":"https://api.github.com/users/b-dean/following{/other_user}","gists_url":"https://api.github.com/users/b-dean/gists{/gist_id}","starred_url":"https://api.github.com/users/b-dean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/b-dean/subscriptions","organizations_url":"https://api.github.com/users/b-dean/orgs","repos_url":"https://api.github.com/users/b-dean/repos","events_url":"https://api.github.com/users/b-dean/events{/privacy}","received_events_url":"https://api.github.com/users/b-dean/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-29T21:32:35Z","updated_at":"2016-02-29T21:35:41Z","closed_at":null,"body":"The docker cookbook version  2.5.7 (and 2.5.8) introduced code in `libaries/_autoload.rb` that uses resources to install some gems.\r\n* https://github.com/chef-cookbooks/docker/blob/v2.5.7/libraries/_autoload.rb\r\n* https://github.com/chef-cookbooks/docker/blob/v2.5.8/libraries/_autoload.rb\r\n\r\nIt seems like the resource reporting of chefspec has problems with this because there isn't a node.runner at that point in the cookbook compile.\r\n\r\n```\r\n     NoMethodError:\r\n       undefined method `step_into?' for nil:NilClass\r\n     # ./vendor/bundle/ruby/2.3.0/gems/chefspec-4.5.0/lib/chefspec/extensions/chef/resource.rb:20:in `run_action'\r\n     # /tmp/d20160229-5221-14o7666/cookbooks/docker/libraries/_autoload.rb:10:in `rescue in <top (required)>'\r\n     # /tmp/d20160229-5221-14o7666/cookbooks/docker/libraries/_autoload.rb:1:in `<top (required)>'\r\n     # ./vendor/bundle/ruby/2.3.0/gems/chef-12.7.2/lib/chef/run_context/cookbook_compiler.rb:191:in `load'\r\n     # ./vendor/bundle/ruby/2.3.0/gems/chef-12.7.2/lib/chef/run_context/cookbook_compiler.rb:191:in `block in load_libraries_from_cookbook'\r\n     # ./vendor/bundle/ruby/2.3.0/gems/chef-12.7.2/lib/chef/run_context/cookbook_compiler.rb:188:in `each'\r\n     # ./vendor/bundle/ruby/2.3.0/gems/chef-12.7.2/lib/chef/run_context/cookbook_compiler.rb:188:in `load_libraries_from_cookbook'\r\n     # ./vendor/bundle/ruby/2.3.0/gems/chef-12.7.2/lib/chef/run_context/cookbook_compiler.rb:99:in `block in compile_libraries'\r\n     # ./vendor/bundle/ruby/2.3.0/gems/chef-12.7.2/lib/chef/run_context/cookbook_compiler.rb:98:in `each'\r\n     # ./vendor/bundle/ruby/2.3.0/gems/chef-12.7.2/lib/chef/run_context/cookbook_compiler.rb:98:in `compile_libraries'\r\n     # ./vendor/bundle/ruby/2.3.0/gems/chef-12.7.2/lib/chef/run_context/cookbook_compiler.rb:71:in `compile'\r\n     # ./vendor/bundle/ruby/2.3.0/gems/chef-12.7.2/lib/chef/run_context.rb:167:in `load'\r\n     # ./vendor/bundle/ruby/2.3.0/gems/chef-12.7.2/lib/chef/policy_builder/expand_node_object.rb:93:in `setup_run_context'\r\n     # ./vendor/bundle/ruby/2.3.0/gems/chef-12.7.2/lib/chef/client.rb:509:in `setup_run_context'\r\n     # ./vendor/bundle/ruby/2.3.0/gems/chefspec-4.5.0/lib/chefspec/solo_runner.rb:117:in `converge'\r\n     # ./vendor/bundle/ruby/2.3.0/gems/chefspec-4.5.0/lib/chefspec/solo_runner.rb:18:in `block in converge'\r\n     # ./vendor/bundle/ruby/2.3.0/gems/chefspec-4.5.0/lib/chefspec/solo_runner.rb:17:in `tap'\r\n     # ./vendor/bundle/ruby/2.3.0/gems/chefspec-4.5.0/lib/chefspec/solo_runner.rb:17:in `converge'\r\n     # ./spec/foo_spec.rb:5:in `block (2 levels) in <top (required)>'\r\n     # ./spec/foo_spec.rb:8:in `block (2 levels) in <top (required)>'\r\n     # ------------------\r\n     # --- Caused by: ---\r\n     # Gem::LoadError:\r\n     #   docker-api is not part of the bundle. Add it to Gemfile.\r\n     #   /home/ben/.rvm/gems/ruby-2.3.0@global/gems/bundler-1.10.6/lib/bundler/rubygems_integration.rb:292:in `block in replace_gem'\r\n```\r\n\r\nHere's a gist with the files I used to make this happen: https://gist.github.com/b-dean/237e97ae01e8d8e4f45e"},"comment":{"url":"https://api.github.com/repos/sethvargo/chefspec/issues/comments/190406736","html_url":"https://github.com/sethvargo/chefspec/issues/676#issuecomment-190406736","issue_url":"https://api.github.com/repos/sethvargo/chefspec/issues/676","id":190406736,"user":{"login":"b-dean","id":3189231,"avatar_url":"https://avatars.githubusercontent.com/u/3189231?v=3","gravatar_id":"","url":"https://api.github.com/users/b-dean","html_url":"https://github.com/b-dean","followers_url":"https://api.github.com/users/b-dean/followers","following_url":"https://api.github.com/users/b-dean/following{/other_user}","gists_url":"https://api.github.com/users/b-dean/gists{/gist_id}","starred_url":"https://api.github.com/users/b-dean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/b-dean/subscriptions","organizations_url":"https://api.github.com/users/b-dean/orgs","repos_url":"https://api.github.com/users/b-dean/repos","events_url":"https://api.github.com/users/b-dean/events{/privacy}","received_events_url":"https://api.github.com/users/b-dean/received_events","type":"User","site_admin":false},"created_at":"2016-02-29T21:35:41Z","updated_at":"2016-02-29T21:35:41Z","body":"I should also point out that a workaround is to just put `docker-api` in your Gemfile so the docker cookbook finds it while it's compiling\r\n\r\n```ruby\r\ngem 'docker-api'\r\n```"}}