After installing Chef Development Kit, i ran "chef verify" -
does know why getting issue.
i dont know reason doing in ubuntu machine.
please me if had faced similar kind of issue.
machine config: ruby 2.2.1 chef 12 server os ubuntu
running verification component 'berkshelf' running verification component 'test-kitchen' running verification component 'tk-policyfile-provisioner' running verification component 'chef-client' running verification component 'chef-dk' running verification component 'chef-provisioning' running verification component 'knife-spork' running verification component 'delivery-cli' running verification component 'git' running verification component 'opscode-pushy-client' running verification component 'chef-sugar' .............. generating cookbook example - ensuring correct cookbook file content ================================================================================ error executing action `create_if_missing` on resource 'template[/tmp/d20160922-20221-1do1qzg/example/spec/unit/recipes/default_spec.rb]' ================================================================================ chef::mixin::template::templateerror ------------------------------------ undefined method `gsub' nil:nilclass resource declaration: --------------------- # in /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-dk-0.17.17/lib/chef-dk/skeletons/code_generator/recipes/cookbook.rb 84: template "#{cookbook_dir}/spec/unit/recipes/default_spec.rb" 85: source "recipe_spec.rb.erb" 86: helpers(chefdk::generator::templatehelper) 87: action :create_if_missing 88: end 89: compiled resource: ------------------ # declared in /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-dk-0.17.17/lib/chef-dk/skeletons/code_generator/recipes/cookbook.rb:84:in `from_file' template("/tmp/d20160922-20221-1do1qzg/example/spec/unit/recipes/default_spec.rb") action [:create_if_missing] retries 0 retry_delay 2 default_guard_interpreter :default source "recipe_spec.rb.erb" helper_modules [chefdk::generator::templatehelper] declared_type :template cookbook_name :code_generator recipe_name "cookbook" atomic_update true path "/tmp/d20160922-20221-1do1qzg/example/spec/unit/recipes/default_spec.rb" end template context: ----------------- on line #5 3: # spec:: default 4: # 5: <%= license_description('#') %> 6: 7: require 'spec_helper' platform: --------- x86_64-linux error: chef failed converge: chef::mixin::template::templateerror (undefined method `gsub' nil:nilclass) on line #5: 3: # spec:: default 4: # 5: <%= license_description('#') %> 6: 7: require 'spec_helper' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-dk-0.17.17/lib/chef-dk/generator.rb:155:in `license_description' (erubis):5:in `block in evaluate' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/erubis-2.7.0/lib/erubis/evaluator.rb:74:in `instance_eval' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/erubis-2.7.0/lib/erubis/evaluator.rb:74:in `evaluate' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/mixin/template.rb:161:in `_render_template' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/mixin/template.rb:147:in `render_template' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/provider/template/content.rb:53:in `file_for_provider' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/file_content_management/content_base.rb:40:in `tempfile' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/provider/file.rb:462:in `tempfile' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/provider/file.rb:339:in `do_generate_content' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/provider/file.rb:150:in `action_create' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/provider/file.rb:162:in `action_create_if_missing' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/provider.rb:145:in `run_action' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/resource.rb:603:in `run_action' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/runner.rb:69:in `run_action' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/runner.rb:97:in `block (2 levels) in converge' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/runner.rb:97:in `each' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/runner.rb:97:in `block in converge' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/resource_collection/resource_list.rb:94:in `block in execute_each_resource' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/resource_collection/stepable_iterator.rb:116:in `call' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/resource_collection/stepable_iterator.rb:116:in `call_iterator_block' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/resource_collection/stepable_iterator.rb:85:in `step' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/resource_collection/stepable_iterator.rb:104:in `iterate' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/resource_collection/resource_list.rb:92:in `execute_each_resource' /opt/chefdk/embedded/lib/ruby/2.1.0/forwardable.rb:183:in `execute_each_resource' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/runner.rb:96:in `converge' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-dk-0.17.17/lib/chef-dk/chef_runner.rb:43:in `converge' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-dk-0.17.17/lib/chef-dk/command/generator_commands/cookbook.rb:82:in `run' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-dk-0.17.17/lib/chef-dk/command/generate.rb:88:in `run' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-dk-0.17.17/lib/chef-dk/command/base.rb:58:in `run_with_default_options' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-dk-0.17.17/lib/chef-dk/cli.rb:73:in `run' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-dk-0.17.17/bin/chef:25:in `<top (required)>' /opt/chefdk/bin/chef:74:in `load' /opt/chefdk/bin/chef:74:in `<main>' caused by: (chef::mixin::template::templateerror) undefined method `gsub' nil:nilclass ...................................... --------------------------------------------- verification of component 'rubocop' succeeded. verification of component 'kitchen-vagrant' succeeded. verification of component 'openssl' succeeded. verification of component 'delivery-cli' succeeded. verification of component 'opscode-pushy-client' succeeded. verification of component 'berkshelf' succeeded. verification of component 'tk-policyfile-provisioner' succeeded. verification of component 'fauxhai' succeeded. verification of component 'inspec' succeeded. verification of component 'chef-sugar' succeeded. verification of component 'test-kitchen' succeeded. verification of component 'chef-dk' failed. verification of component 'chefspec' succeeded. verification of component 'knife-spork' succeeded. verification of component 'chef-client' succeeded. verification of component 'generated-cookbooks-pass-chefspec' succeeded. verification of component 'chef-provisioning' succeeded. verification of component 'package installation' succeeded. verification of component 'git' succeeded.
hi if facing same issue that's license issue can find solutions here.
Comments
Post a Comment