Open jeffbyrnes opened 6 years ago
That's a filtered stack trace, lwrp_polyfill.rb:34
is a super
call. Get the full stack trace and it will probably point at something inside Chef.
@coderanger alrighty, thanks; I’ll see about that.
Well, got ChefSpec to spit out a full stack trace. Interestingly, it works fine otherwise, only fails like this during a ChefSpec test:
NoMethodError:
undefined method `new_resource' for ConsulCookbook::Resource::ConsulConfig
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.5.33/lib/chef/resource.rb:1303:in `method_missing'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chefspec-7.3.2/lib/chefspec/api/stubs_for.rb:37:in `block (2 levels) in <module:StubsFor>'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/message_expectation.rb:683:in `block in call'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/message_expectation.rb:682:in `map'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/message_expectation.rb:682:in `call'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/message_expectation.rb:565:in `invoke_incrementing_actual_calls_by'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/message_expectation.rb:422:in `invoke'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/proxy.rb:179:in `message_received'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/proxy.rb:326:in `message_received'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/method_double.rb:77:in `proxy_method_invoked'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/method_double.rb:64:in `block (2 levels) in define_proxy_method'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chefspec-7.3.2/lib/chefspec/extensions/chef/resource.rb:25:in `initialize'
# /private/var/folders/30/nsmp68z977s8q1x10z4h9_fr0000gn/T/chefspec20181010-29322-1c5miy5file_cache_path/cookbooks/poise/files/halite_gem/poise/helpers/lwrp_polyfill.rb:34:in `initialize'
# /private/var/folders/30/nsmp68z977s8q1x10z4h9_fr0000gn/T/chefspec20181010-29322-1c5miy5file_cache_path/cookbooks/poise/files/halite_gem/poise/helpers/resource_name.rb:32:in `initialize'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.5.33/lib/chef/resource_builder.rb:46:in `new'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.5.33/lib/chef/resource_builder.rb:46:in `build'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.5.33/lib/chef/dsl/declare_resource.rb:314:in `build_resource'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.5.33/lib/chef/dsl/declare_resource.rb:271:in `declare_resource'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.5.33/lib/chef/dsl/resources.rb:38:in `consul_config'
# /var/folders/30/nsmp68z977s8q1x10z4h9_fr0000gn/T/chefspec20181010-29322-1c5miy5file_cache_path/cookbooks/consul/recipes/default.rb:16:in `from_file'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.5.33/lib/chef/mixin/from_file.rb:34:in `instance_eval'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.5.33/lib/chef/mixin/from_file.rb:34:in `from_file'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.5.33/lib/chef/cookbook_version.rb:199:in `load_recipe'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.5.33/lib/chef/run_context.rb:350:in `load_recipe'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.5.33/lib/chef/run_context.rb:306:in `block in include_recipe'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.5.33/lib/chef/run_context.rb:305:in `each'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.5.33/lib/chef/run_context.rb:305:in `include_recipe'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.5.33/lib/chef/dsl/include_recipe.rb:26:in `include_recipe'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/message_expectation.rb:99:in `call'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/message_expectation.rb:99:in `block in and_call_original'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/message_expectation.rb:729:in `call'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/message_expectation.rb:565:in `invoke_incrementing_actual_calls_by'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/message_expectation.rb:422:in `invoke'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/proxy.rb:179:in `message_received'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/proxy.rb:326:in `message_received'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/method_double.rb:77:in `proxy_method_invoked'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/method_double.rb:64:in `block (2 levels) in define_proxy_method'
# /var/folders/30/nsmp68z977s8q1x10z4h9_fr0000gn/T/chefspec20181010-29322-1c5miy5file_cache_path/cookbooks/ds_consul/recipes/default.rb:51:in `from_file'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.5.33/lib/chef/mixin/from_file.rb:34:in `instance_eval'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.5.33/lib/chef/mixin/from_file.rb:34:in `from_file'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.5.33/lib/chef/cookbook_version.rb:199:in `load_recipe'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.5.33/lib/chef/run_context.rb:350:in `load_recipe'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.5.33/lib/chef/run_context.rb:306:in `block in include_recipe'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.5.33/lib/chef/run_context.rb:305:in `each'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.5.33/lib/chef/run_context.rb:305:in `include_recipe'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.5.33/lib/chef/dsl/include_recipe.rb:26:in `include_recipe'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/message_expectation.rb:99:in `call'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/message_expectation.rb:99:in `block in and_call_original'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/message_expectation.rb:729:in `call'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/message_expectation.rb:565:in `invoke_incrementing_actual_calls_by'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/message_expectation.rb:422:in `invoke'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/proxy.rb:179:in `message_received'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/proxy.rb:326:in `message_received'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/method_double.rb:77:in `proxy_method_invoked'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/method_double.rb:64:in `block (2 levels) in define_proxy_method'
# /var/folders/30/nsmp68z977s8q1x10z4h9_fr0000gn/T/chefspec20181010-29322-1c5miy5file_cache_path/cookbooks/ds_base/recipes/default.rb:54:in `block in from_file'
# /var/folders/30/nsmp68z977s8q1x10z4h9_fr0000gn/T/chefspec20181010-29322-1c5miy5file_cache_path/cookbooks/ds_base/recipes/default.rb:54:in `each'
# /var/folders/30/nsmp68z977s8q1x10z4h9_fr0000gn/T/chefspec20181010-29322-1c5miy5file_cache_path/cookbooks/ds_base/recipes/default.rb:54:in `from_file'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.5.33/lib/chef/mixin/from_file.rb:34:in `instance_eval'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.5.33/lib/chef/mixin/from_file.rb:34:in `from_file'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.5.33/lib/chef/cookbook_version.rb:199:in `load_recipe'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.5.33/lib/chef/run_context.rb:350:in `load_recipe'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.5.33/lib/chef/run_context/cookbook_compiler.rb:166:in `block in compile_recipes'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.5.33/lib/chef/run_context/cookbook_compiler.rb:163:in `each'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.5.33/lib/chef/run_context/cookbook_compiler.rb:163:in `compile_recipes'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chefspec-7.3.2/lib/chefspec/extensions/chef/run_context/cookbook_compiler.rb:62:in `compile_recipes'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.5.33/lib/chef/run_context/cookbook_compiler.rb:79:in `compile'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.5.33/lib/chef/run_context.rb:199:in `load'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.5.33/lib/chef/policy_builder/expand_node_object.rb:97:in `setup_run_context'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.5.33/lib/chef/client.rb:515:in `setup_run_context'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chefspec-7.3.2/lib/chefspec/solo_runner.rb:113:in `converge'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chefspec-7.3.2/lib/chefspec/server_runner.rb:35:in `converge'
# ./spec/unit/recipes/default_spec.rb:38:in `block (3 levels) in <top (required)>'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/memoized_helpers.rb:298:in `block (2 levels) in let'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/memoized_helpers.rb:157:in `block (3 levels) in fetch_or_store'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/memoized_helpers.rb:157:in `fetch'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/memoized_helpers.rb:157:in `block (2 levels) in fetch_or_store'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-support-3.7.1/lib/rspec/support/reentrant_mutex.rb:23:in `synchronize'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/memoized_helpers.rb:156:in `block in fetch_or_store'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/memoized_helpers.rb:155:in `fetch'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/memoized_helpers.rb:155:in `fetch_or_store'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/memoized_helpers.rb:298:in `block in let'
# ./spec/unit/recipes/default_spec.rb:63:in `block (3 levels) in <top (required)>'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/example.rb:254:in `instance_exec'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/example.rb:254:in `block in run'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/hooks.rb:466:in `block in run'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/hooks.rb:606:in `block in run_around_example_hooks_for'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/example.rb:342:in `call'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chefspec-7.3.2/lib/chefspec/api/core.rb:18:in `block in <module:Core>'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/example.rb:447:in `instance_exec'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/example.rb:447:in `instance_exec'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/hooks.rb:375:in `execute_with'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/hooks.rb:608:in `block (2 levels) in run_around_example_hooks_for'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/example.rb:342:in `call'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/hooks.rb:609:in `run_around_example_hooks_for'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/hooks.rb:466:in `run'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/example.rb:457:in `with_around_example_hooks'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/example.rb:500:in `with_around_and_singleton_context_hooks'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/example.rb:251:in `run'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/example_group.rb:628:in `block in run_examples'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/example_group.rb:624:in `map'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/example_group.rb:624:in `run_examples'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/example_group.rb:590:in `run'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/example_group.rb:591:in `block in run'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/example_group.rb:591:in `map'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/example_group.rb:591:in `run'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/runner.rb:118:in `block (3 levels) in run_specs'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/runner.rb:118:in `map'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/runner.rb:118:in `block (2 levels) in run_specs'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/configuration.rb:1926:in `with_suite_hooks'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/runner.rb:113:in `block in run_specs'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/reporter.rb:79:in `report'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/runner.rb:112:in `run_specs'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/runner.rb:87:in `run'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/runner.rb:71:in `run'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib/rspec/core/runner.rb:45:in `invoke'
# /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/exe/rspec:4:in `<top (required)>'
# /opt/chefdk/embedded/bin/rspec:23:in `load'
# /opt/chefdk/embedded/bin/rspec:23:in `<main>'
Ahh, a compat issue between Poise's Fused mode and ChefSpec. Sorry, unlikely I'll ever fix this. Happy to leave the ticket open, but it's a very niche feature and Chef is no longer a development priority for me.
@coderanger thanks for the explanation and the update to the title. Helps me quite a lot!
Out of scope for this issue, but while I have a chance, I wonder if you’ve considered what ongoing maintenance of your cookbooks & Chef-centric libraries will look like, if it’s no longer a priority. No judgment, only curious if you’ve given it any thought.
@jeffbyrnes - Do you have any ideas on how to work around this? I'm getting the same issue even when I try to run my tests with Chef 13...
1) foo-consul-registrator::default When all attributes are default, on CentOS 7.4.1708 converges successfully
Failure/Error: expect { chef_run }.to_not raise_error
expected no Exception, got #<NoMethodError: undefined method `new_resource' for ConsulCookbook::Resource::ConsulConfig> with backtrace:
# /Users/a-jneufeld/.chefdk/gem/ruby/2.5.0/gems/chef-13.12.3/lib/chef/resource.rb:1298:in `method_missing'
# /private/var/folders/5k/wvflv8r90551zw2798jcbh6h0000gn/T/chefspec20181114-38157-184t13zfile_cache_path/cookbooks/poise/files/halite_gem/poise/helpers/lwrp_polyfill.rb:34:in `initialize'
# /private/var/folders/5k/wvflv8r90551zw2798jcbh6h0000gn/T/chefspec20181114-38157-184t13zfile_cache_path/cookbooks/poise/files/halite_gem/poise/helpers/resource_name.rb:32:in `initialize'
# /Users/a-jneufeld/.chefdk/gem/ruby/2.5.0/gems/chef-13.12.3/lib/chef/resource_builder.rb:46:in `new'
# /Users/a-jneufeld/.chefdk/gem/ruby/2.5.0/gems/chef-13.12.3/lib/chef/resource_builder.rb:46:in `build'
# /Users/a-jneufeld/.chefdk/gem/ruby/2.5.0/gems/chef-13.12.3/lib/chef/dsl/declare_resource.rb:293:in `build_resource'
# /Users/a-jneufeld/.chefdk/gem/ruby/2.5.0/gems/chef-13.12.3/lib/chef/dsl/declare_resource.rb:250:in `declare_resource'
# /Users/a-jneufeld/.chefdk/gem/ruby/2.5.0/gems/chef-13.12.3/lib/chef/dsl/resources.rb:38:in `consul_config'
# /var/folders/5k/wvflv8r90551zw2798jcbh6h0000gn/T/chefspec20181114-38157-184t13zfile_cache_path/cookbooks/consul/recipes/default.rb:16:in `from_file'
# /Users/a-jneufeld/.chefdk/gem/ruby/2.5.0/gems/chef-13.12.3/lib/chef/mixin/from_file.rb:30:in `instance_eval'
# /Users/a-jneufeld/.chefdk/gem/ruby/2.5.0/gems/chef-13.12.3/lib/chef/mixin/from_file.rb:30:in `from_file'
# /Users/a-jneufeld/.chefdk/gem/ruby/2.5.0/gems/chef-13.12.3/lib/chef/cookbook_version.rb:205:in `load_recipe'
# /Users/a-jneufeld/.chefdk/gem/ruby/2.5.0/gems/chef-13.12.3/lib/chef/run_context.rb:342:in `load_recipe'
# /Users/a-jneufeld/.chefdk/gem/ruby/2.5.0/gems/chef-13.12.3/lib/chef/run_context.rb:298:in `block in include_recipe'
@neufeldtech no workaround, other than dropping ChefSpec & relying entirely upon Test Kitchen for tests.
@jeffbyrnes , my colleague informed me that if we pin chefspec to 7.2.1, we can avoid this error:
gem 'chefspec', '7.2.1'
Nice find! Thanks for sharing.
Hi @neufeldtech,
Thank you for sharing your workaround.
I ran into the same issue and pinned my chefspec back to 7.2.1 which avoided: NoMethodError: undefined method `new_resource' for ConsulCookbook::Resource::ConsulConfigV1
but a new error came up: undefined method `platform_family?' for ConsulCookbook::Provider::ConsulInstallationBinary:Class
Wonder if you encounter this issue as well ?
Haven't encountered this, sorry.
On Tue., Mar. 5, 2019, 12:57 p.m. Cassie Shan notifications@github.com wrote:
Hi @neufeldtech https://github.com/neufeldtech,
Thank you for sharing your workaround.
I ran into the same issue and pinned my chefspec back to 7.2.1 which avoided: NoMethodError: undefined method `new_resource' for ConsulCookbook::Resource::ConsulConfigV1
but a new error came up: undefined method `platform_family?' for ConsulCookbook::Provider::ConsulInstallationBinary:Class
Wonder if you encounter this issue as well ?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/poise/poise/issues/37#issuecomment-469814204, or mute the thread https://github.com/notifications/unsubscribe-auth/AH3tSDCj7wsha0ASBaA_rAvo398AP-MSks5vTr4qgaJpZM4XTqr2 .
Unfortunately I can’t be sure it’s Chef 14.5.33, but I recently upgraded ChefDK, and now I’m running into this when using the Consul cookbook, which depends on this one:
I originally noticed this in our build systems, which always use the latest ChefDK, began failing. After I upgraded my own local install, I, too, began running into this issue.
This is probably an issue upstream, in Chef itself, but it appears to have manifested in this cookbook/library, so I figured I’d start here.