Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chef_gem[treetop] (dynamically defined) had an error: NoMethodError: undefined method `full_name' for nil:NilClass #34

Open
runningman84 opened this issue Jun 5, 2013 · 3 comments

Comments

@runningman84
Copy link

I am unable to use chef-solo-search behind a http proxy. I tried to configure the proxy in the vm_aws recipe:

ENV['http_proxy'] = "http://192.168.99.5:3128/"
ENV['https_proxy'] = "http://192.168.99.5:3128/"
Chef::Config[:http_proxy] = ENV['http_proxy']

but I get this error

Setting up chef (11.4.4-2.ubuntu.11.04) ...
Thank you for installing Chef!
[db1aws] Running provisioner: chef_solo...
Generating chef JSON and uploading...
Running chef-solo...
stdin: is not a tty
[2013-06-05T12:05:47+00:00] INFO: *** Chef 11.4.4 ***
[2013-06-05T12:05:49+00:00] INFO: Setting the run_list to ["role[vm_aws]", "role[dbsrv_single]"] from JSON
[2013-06-05T12:05:49+00:00] INFO: Run List is [role[vm_aws], role[dbsrv_single]]
[2013-06-05T12:05:49+00:00] INFO: Run List expands to [els_base::ec2, chef-solo-search, apt, apt::cacher-client, mongodb::10gen_repo, vim, collectd, els_base, els_mongo, mongodb::default]
[2013-06-05T12:05:49+00:00] INFO: Starting Chef Run for ip-192-168-99-11.eu-west-1.compute.internal
[2013-06-05T12:05:49+00:00] INFO: Running start handlers
[2013-06-05T12:05:49+00:00] INFO: Start handlers complete.
[2013-06-05T12:05:49+00:00] INFO: Processing chef_gem[treetop] action install (dynamically defined)


================================================================================

Recipe Compile Error in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/chef-solo-search/libraries/search.rb

================================================================================




NoMethodError

-------------

chef_gem[treetop] (dynamically defined) had an error: NoMethodError: undefined method `full_name' for nil:NilClass




Cookbook Trace:

---------------

  /tmp/vagrant-chef-1/chef-solo-1/cookbooks/chef-solo-search/libraries/search.rb:37:in `rescue in <top (required)>'
  /tmp/vagrant-chef-1/chef-solo-1/cookbooks/chef-solo-search/libraries/search.rb:31:in `<top (required)>'




Relevant File Content:

----------------------

/tmp/vagrant-chef-1/chef-solo-1/cookbooks/chef-solo-search/libraries/search.rb:

 30:    # Ensure the treetop gem is installed and available
 31:    begin
 32:      require 'treetop'
 33:    rescue LoadError
 34:      run_context = Chef::RunContext.new(Chef::Node.new, {}, Chef::EventDispatch::Dispatcher.new)
 35:      chef_gem = Chef::Resource::ChefGem.new("treetop", run_context)
 36:      chef_gem.version('>= 1.4')
 37>>     chef_gem.run_action(:install)
 38:    end
 39:  
 40:    require 'search/overrides'
 41:    require 'search/parser'
 42:  
 43:    module Search; class Helper; end; end
 44:  
 45:    # The search and data_bag related methods moved form `Chef::Mixin::Language`
 46:    # to `Chef::DSL::DataQuery` in Chef 11.





[2013-06-05T12:06:52+00:00] ERROR: Running exception handlers
[2013-06-05T12:06:52+00:00] ERROR: Exception handlers complete
[2013-06-05T12:06:52+00:00] FATAL: Stacktrace dumped to /tmp/vagrant-chef-1/chef-stacktrace.out
[2013-06-05T12:06:52+00:00] FATAL: NoMethodError: chef_gem[treetop] (dynamically defined) had an error: NoMethodError: undefined method `full_name' for nil:NilClass
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.
@michaelglass
Copy link

this looks like an issue related to installing the treetop gem. I couldn't repro. Halp?

@benlangfeld
Copy link

All that's required is a ubuntu bento box and including chef-solo-search in the runlist, you'll see this occur very readily. Unfortunately this makes this cookbook entirely useless right now, and I'm not sure what the solution is.

@benlangfeld
Copy link

I note this cookbook doesn't have test-kitchen setup. I'll add it and submit a PR for an easy demo of this issue.

benlangfeld referenced this issue in mojolingo/chef-solo-search Apr 3, 2014
benlangfeld added a commit to mojolingo/adam_cookbook that referenced this issue Apr 3, 2014
michaelglass added a commit that referenced this issue Apr 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants