Skip to content

Instantly share code, notes, and snippets.

@kevinkarwaski
Created March 22, 2012 16:37
Show Gist options
  • Save kevinkarwaski/2159458 to your computer and use it in GitHub Desktop.
Save kevinkarwaski/2159458 to your computer and use it in GitHub Desktop.
NoMethodError gem_package chef resource on bootstrap
This only seems to happen if I attempt to override the passenger version in a role or environment while bootstrapping. If I add the overrides after the bootstrap completes successfully, the block gets executed successfully.
Block in recipe:
gem_package "passenger" do
version node[:nginx][:passenger_version]
notifies :run, resources(:bash => "compile_nginx_source")
end
NoMethodError: gem_package[passenger] (nginx::source_with_passenger line 75) had an error: NoMethodError: undefined method `full_name' for nil:NilClass
/usr/local/rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:134:in `gather_dependencies'
/usr/local/rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:134:in `map'
/usr/local/rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:134:in `gather_dependencies'
/usr/local/rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:268:in `install'
/usr/local/rvm/gems/ree-1.8.7-2011.03/gems/chef-0.10.8/bin/../lib/chef/provider/package/rubygems.rb:154:in `install'
/usr/local/rvm/gems/ree-1.8.7-2011.03/gems/chef-0.10.8/bin/../lib/chef/provider/package/rubygems.rb:177:in `with_correct_verbosity'
/usr/local/rvm/gems/ree-1.8.7-2011.03/gems/chef-0.10.8/bin/../lib/chef/provider/package/rubygems.rb:153:in `install'
/usr/local/rvm/gems/ree-1.8.7-2011.03/gems/chef-0.10.8/bin/../lib/chef/provider/package/rubygems.rb:88:in `with_gem_sources'
/usr/local/rvm/gems/ree-1.8.7-2011.03/gems/chef-0.10.8/bin/../lib/chef/provider/package/rubygems.rb:152:in `install'
/usr/local/rvm/gems/ree-1.8.7-2011.03/gems/chef-0.10.8/bin/../lib/chef/provider/package/rubygems.rb:401:in `install_package'
/usr/local/rvm/gems/ree-1.8.7-2011.03/gems/chef-0.10.8/bin/../lib/chef/provider/package.rb:60:in `action_install'
/usr/local/rvm/gems/ree-1.8.7-2011.03/gems/chef-0.10.8/bin/../lib/chef/resource.rb:440:in `send'
/usr/local/rvm/gems/ree-1.8.7-2011.03/gems/chef-0.10.8/bin/../lib/chef/resource.rb:440:in `run_action'
/usr/local/rvm/gems/ree-1.8.7-2011.03/gems/chef-0.10.8/bin/../lib/chef/runner.rb:45:in `run_action'
/usr/local/rvm/gems/ree-1.8.7-2011.03/gems/chef-0.10.8/bin/../lib/chef/runner.rb:81:in `converge'
/usr/local/rvm/gems/ree-1.8.7-2011.03/gems/chef-0.10.8/bin/../lib/chef/runner.rb:81:in `each'
/usr/local/rvm/gems/ree-1.8.7-2011.03/gems/chef-0.10.8/bin/../lib/chef/runner.rb:81:in `converge'
/usr/local/rvm/gems/ree-1.8.7-2011.03/gems/chef-0.10.8/bin/../lib/chef/resource_collection.rb:94:in `execute_each_resource'
/usr/local/rvm/gems/ree-1.8.7-2011.03/gems/chef-0.10.8/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:in `call'
/usr/local/rvm/gems/ree-1.8.7-2011.03/gems/chef-0.10.8/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:in `call_iterator_block'
/usr/local/rvm/gems/ree-1.8.7-2011.03/gems/chef-0.10.8/bin/../lib/chef/resource_collection/stepable_iterator.rb:85:in `step'
/usr/local/rvm/gems/ree-1.8.7-2011.03/gems/chef-0.10.8/bin/../lib/chef/resource_collection/stepable_iterator.rb:104:in `iterate'
/usr/local/rvm/gems/ree-1.8.7-2011.03/gems/chef-0.10.8/bin/../lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index'
/usr/local/rvm/gems/ree-1.8.7-2011.03/gems/chef-0.10.8/bin/../lib/chef/resource_collection.rb:92:in `execute_each_resource'
/usr/local/rvm/gems/ree-1.8.7-2011.03/gems/chef-0.10.8/bin/../lib/chef/runner.rb:76:in `converge'
/usr/local/rvm/gems/ree-1.8.7-2011.03/gems/chef-0.10.8/bin/../lib/chef/client.rb:312:in `converge'
/usr/local/rvm/gems/ree-1.8.7-2011.03/gems/chef-0.10.8/bin/../lib/chef/client.rb:160:in `run'
/usr/local/rvm/gems/ree-1.8.7-2011.03/gems/chef-0.10.8/bin/../lib/chef/application/client.rb:239:in `run_application'
/usr/local/rvm/gems/ree-1.8.7-2011.03/gems/chef-0.10.8/bin/../lib/chef/application/client.rb:229:in `loop'
/usr/local/rvm/gems/ree-1.8.7-2011.03/gems/chef-0.10.8/bin/../lib/chef/application/client.rb:229:in `run_application'
/usr/local/rvm/gems/ree-1.8.7-2011.03/gems/chef-0.10.8/bin/../lib/chef/application.rb:67:in `run'
/usr/local/rvm/gems/ree-1.8.7-2011.03/gems/chef-0.10.8/bin/chef-client:26
/usr/local/rvm/gems/ree-1.8.7-2011.03/bin/chef-client:19:in `load'
/usr/local/rvm/gems/ree-1.8.7-2011.03/bin/chef-client:19
This deprecation error may be related:
[Mon, 26 Mar 2012 09:47:36 -0400] INFO: Processing gem_package[passenger] action install (nginx::source_with_passenger line 74)
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.source_index called from /usr/local/rvm/gems/ree-1.8.7-2011.03/gems/chef-0.10.8/bin/../lib/chef/provider/package/rubygems.rb:203.
NOTE: Gem::SourceIndex#search is deprecated with no replacement. It will be removed on or after 2011-11-01.
Gem::SourceIndex#search called from /usr/local/rvm/gems/ree-1.8.7-2011.03/gems/chef-0.10.8/bin/../lib/chef/provider/package/rubygems.rb:77.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment