sous-chefs/ruby_build

Fails with FATAL: NameError: uninitialized constant Chef::Rbenv::ScriptHelpers

Closed this issue · 5 comments

Thanks for this chef-ruby_build cookbook but when i run it with chef solo, it fails. The stack-trace of the error is shown below. please note that i am trying to run two of your cookbooks ie chef-rbenv and chef-ruby_build and this is the error i get.

Thanks for helping.

this is my dna.json file:
{
"run_list": [
"recipe[chef-ruby_build::default]",
"recipe[chef-rbenv::system_install]"
]
}

The Stacktrace
[Thu, 22 Dec 2011 01:22:46 +0000] INFO: *** Chef 0.10.8 ***
[Thu, 22 Dec 2011 01:22:50 +0000] INFO: Setting the run_list to ["recipe[chef-ruby_build::default]", "recipe[chef-rbenv:system_install]"] from JSON
[Thu, 22 Dec 2011 01:22:50 +0000] INFO: Run List is [recipe[chef-ruby_build::default], recipe[chef-rbenv:system_install]]
[Thu, 22 Dec 2011 01:22:50 +0000] INFO: Run List expands to [chef-ruby_build::default, chef-rbenv:system_install]
[Thu, 22 Dec 2011 01:22:50 +0000] INFO: Starting Chef Run for dav.localdomain
[Thu, 22 Dec 2011 01:22:50 +0000] INFO: Running start handlers
[Thu, 22 Dec 2011 01:22:50 +0000] INFO: Start handlers complete.
[Thu, 22 Dec 2011 01:22:50 +0000] WARN: Missing gem 'right_aws'
[Thu, 22 Dec 2011 01:22:50 +0000] ERROR: Running exception handlers
[Thu, 22 Dec 2011 01:22:50 +0000] ERROR: Exception handlers complete
[Thu, 22 Dec 2011 01:22:50 +0000] FATAL: Stacktrace dumped to /var/chef-solo/chef-stacktrace.out
[Thu, 22 Dec 2011 01:22:50 +0000] FATAL: NameError: uninitialized constant Chef::Rbenv::ScriptHelpers

/var/chef-solo/cookbooks/chef-rbenv/libraries/chef_provider_package_rbenvrubygems.rb:42:in <class:RbenvRubygems>' /var/chef-solo/cookbooks/chef-rbenv/libraries/chef_provider_package_rbenvrubygems.rb:25:inclass:Package'
/var/chef-solo/cookbooks/chef-rbenv/libraries/chef_provider_package_rbenvrubygems.rb:24:in <class:Provider>' /var/chef-solo/cookbooks/chef-rbenv/libraries/chef_provider_package_rbenvrubygems.rb:23:inclass:Chef'
/var/chef-solo/cookbooks/chef-rbenv/libraries/chef_provider_package_rbenvrubygems.rb:22:in <top (required)>' /usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/run_context.rb:82:inload'
/usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/run_context.rb:82:in block in load_libraries' /usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/run_context.rb:120:incall'
/usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/run_context.rb:120:in block (2 levels) in foreach_cookbook_load_segment' /usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/run_context.rb:119:ineach'
/usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/run_context.rb:119:in block in foreach_cookbook_load_segment' /usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/run_context.rb:117:ineach'
/usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/run_context.rb:117:in foreach_cookbook_load_segment' /usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/run_context.rb:80:inload_libraries'
/usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/run_context.rb:57:in load' /usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/client.rb:195:insetup_run_context'
/usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/client.rb:159:in run' /usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/application/solo.rb:192:inblock in run_application'
/usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/application/solo.rb:183:in loop' /usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/application/solo.rb:183:inrun_application'
/usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/application.rb:67:in run' /usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/bin/chef-solo:25:in<top (required)>'
/usr/bin/chef-solo:19:in load' /usr/bin/chef-solo:19:in

'

Try to change the chef-rbenv directory to rbenv and chef-ruby_build to ruby_build. Unfortunately due to the way Chef creates classes for LWRPs, the cookbooks need to be named with the chef- at the beginning. That should hopefully do it. If not, let me know!

Thanks for your help. It didn't work. I have decided to just install rbenv and ruby_build manually for now.

Enjoy the christmas.

@fnichol I just wanted to say that I wish I knew that directory change trick earlier! You might want to put that in the docs.

appears to still be an issue

lock commented

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.