fnichol/chef-ruby_build — Issue #2: Fails with: the enclosing directory /root/.chef/state/cache does not exist
Author: hedgehog
Created: 2012-02-09 01:35:50+00:00
State: open

I bootstrap rbenv+ruby+bundler+chef as a user install under `/root/.rbenv`, then invoke a chef-solo run to install system wide.
The apt cache-client recipe installs fine, so chef seems to run fine fine.

At the ruby_build install stage this happens:

[Thu, 09 Feb 2012 12:28:45 +1100] INFO: Processing package[tar] action install (ruby_build::default line 34)
[Thu, 09 Feb 2012 12:28:45 +1100] INFO: Processing package[bash] action install (ruby_build::default line 34)
[Thu, 09 Feb 2012 12:28:45 +1100] INFO: Processing package[curl] action install (ruby_build::default line 34)
[Thu, 09 Feb 2012 12:28:45 +1100] INFO: Processing package[git-core] action install (ruby_build::default line 34)
[Thu, 09 Feb 2012 12:28:45 +1100] INFO: Processing execute[Install ruby-build] action nothing (ruby_build::default line 38)
[Thu, 09 Feb 2012 12:28:45 +1100] INFO: Processing git[/root/.chef/state/cache/ruby-build] action checkout (ruby_build::default line 48)
[Thu, 09 Feb 2012 12:28:45 +1100] ERROR: git[/root/.chef/state/cache/ruby-build] (ruby_build::default line 48) has had an error
[Thu, 09 Feb 2012 12:28:45 +1100] ERROR: git[/root/.chef/state/cache/ruby-build] (/home/hedge/personal-chef/cookbooks/ruby_build/recipes/default.rb:48:in `from_file') had an error:
git[/root/.chef/state/cache/ruby-build] (ruby_build::default line 48) had an error: Chef::Exceptions::MissingParentDirectory: Cannot clone git[/root/.chef/state/cache/ruby-build] to /root/.chef/state/cache/ruby-build, the enclosing directory /root/.chef/state/cache does not exist
/home/hedge/personal-chef/vendor/ruby/1.9.1/gems/chef-0.10.8/lib/chef/provider/git.rb:81:in `assert_target_directory_valid!'
/home/hedge/personal-chef/vendor/ruby/1.9.1/gems/chef-0.10.8/lib/chef/provider/git.rb:39:in `action_checkout'
/home/hedge/personal-chef/vendor/ruby/1.9.1/gems/chef-0.10.8/lib/chef/resource.rb:440:in `run_action'
/home/hedge/personal-chef/vendor/ruby/1.9.1/gems/chef-0.10.8/lib/chef/runner.rb:45:in `run_action'
/home/hedge/personal-chef/vendor/ruby/1.9.1/gems/chef-0.10.8/lib/chef/runner.rb:81:in `block (2 levels) in converge'
/home/hedge/personal-chef/vendor/ruby/1.9.1/gems/chef-0.10.8/lib/chef/runner.rb:81:in `each'
/home/hedge/personal-chef/vendor/ruby/1.9.1/gems/chef-0.10.8/lib/chef/runner.rb:81:in `block in converge'
/home/hedge/personal-chef/vendor/ruby/1.9.1/gems/chef-0.10.8/lib/chef/resource_collection.rb:94:in `block in execute_each_resource'
/home/hedge/personal-chef/vendor/ruby/1.9.1/gems/chef-0.10.8/lib/chef/resource_collection/stepable_iterator.rb:116:in `call'
/home/hedge/personal-chef/vendor/ruby/1.9.1/gems/chef-0.10.8/lib/chef/resource_collection/stepable_iterator.rb:116:in `call_iterator_block'
/home/hedge/personal-chef/vendor/ruby/1.9.1/gems/chef-0.10.8/lib/chef/resource_collection/stepable_iterator.rb:85:in `step'
/home/hedge/personal-chef/vendor/ruby/1.9.1/gems/chef-0.10.8/lib/chef/resource_collection/stepable_iterator.rb:104:in `iterate'
/home/hedge/personal-chef/vendor/ruby/1.9.1/gems/chef-0.10.8/lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index'
/home/hedge/personal-chef/vendor/ruby/1.9.1/gems/chef-0.10.8/lib/chef/resource_collection.rb:92:in `execute_each_resource'
/home/hedge/personal-chef/vendor/ruby/1.9.1/gems/chef-0.10.8/lib/chef/runner.rb:76:in `converge'
/home/hedge/personal-chef/vendor/ruby/1.9.1/gems/chef-0.10.8/lib/chef/client.rb:312:in `converge'
/home/hedge/personal-chef/vendor/ruby/1.9.1/gems/chef-0.10.8/lib/chef/client.rb:160:in `run'
/home/hedge/personal-chef/vendor/ruby/1.9.1/gems/chef-0.10.8/lib/chef/application/solo.rb:192:in `block in run_application'
/home/hedge/personal-chef/vendor/ruby/1.9.1/gems/chef-0.10.8/lib/chef/application/solo.rb:183:in `loop'
/home/hedge/personal-chef/vendor/ruby/1.9.1/gems/chef-0.10.8/lib/chef/application/solo.rb:183:in `run_application'
/home/hedge/personal-chef/vendor/ruby/1.9.1/gems/chef-0.10.8/lib/chef/application.rb:67:in `run'
/home/hedge/personal-chef/vendor/ruby/1.9.1/gems/chef-0.10.8/bin/chef-solo:25:in `'
/home/hedge/personal-chef/vendor/ruby/1.9.1/bin/chef-solo:19:in `load'
/home/hedge/personal-chef/vendor/ruby/1.9.1/bin/chef-solo:19:in `

'
[Thu, 09 Feb 2012 12:28:45 +1100] ERROR: Running exception handlers
[Thu, 09 Feb 2012 12:28:45 +1100] ERROR: Exception handlers complete
[Thu, 09 Feb 2012 12:28:45 +1100] FATAL: Stacktrace dumped to /root/.chef/state/cache/chef-stacktrace.out
[Thu, 09 Feb 2012 12:28:45 +1100] FATAL: Chef::Exceptions::MissingParentDirectory: git[/root/.chef/state/cache/ruby-build] (ruby_build::default line 48) had an error: Chef::Exceptions::MissingParentDirectory: Cannot clone git[/root/.chef/state/cache/ruby-build] to /root/.chef/state/cache/ruby-build, the enclosing directory /root/.chef/state/cache does not exist