Skip to content

Instantly share code, notes, and snippets.

@jcderose
Created July 28, 2015 22:29
Show Gist options
  • Save jcderose/0f589b36aad50c05d737 to your computer and use it in GitHub Desktop.
Save jcderose/0f589b36aad50c05d737 to your computer and use it in GitHub Desktop.
Chef::Provider::Package::Rubygems::CurrentGemEnvironment::Bundler Error
Compiling Cookbooks...
Recipe: aws::default
* chef_gem[aws-sdk] action install
================================================================================
Error executing action `install` on resource 'chef_gem[aws-sdk]'
================================================================================
NameError
---------
uninitialized constant Chef::Provider::Package::Rubygems::CurrentGemEnvironment::Bundler
Cookbook Trace:
---------------
/tmp/kitchen/cache/cookbooks/opsworks_commons/libraries/monkey_patch_rubygems_provider.rb:41:in `gem_home'
/tmp/kitchen/cache/cookbooks/opsworks_commons/libraries/monkey_patch_rubygems_provider.rb:77:in `gem_specification'
/tmp/kitchen/cache/cookbooks/aws/recipes/default.rb:19:in `from_file'
Resource Declaration:
---------------------
# In /tmp/kitchen/cache/cookbooks/aws/recipes/default.rb
19: chef_gem 'aws-sdk' do
20: version node['aws']['aws_sdk_version']
21: compile_time true if Chef::Resource::ChefGem.instance_methods(false).include?(:compile_time)
22: action :install
23: end
24:
Compiled Resource:
------------------
# Declared in /tmp/kitchen/cache/cookbooks/aws/recipes/default.rb:19:in `from_file'
chef_gem("aws-sdk") do
provider Chef::Provider::Package::Rubygems
action [:install]
retries 0
retry_delay 2
package_name "aws-sdk"
version "~> 2.0.22"
cookbook_name "aws"
recipe_name "default"
end
================================================================================
Recipe Compile Error in /tmp/kitchen/cache/cookbooks/setup-ebs-encryption/recipes/default.rb
================================================================================
NameError
---------
chef_gem[aws-sdk] (aws::default line 19) had an error: NameError: uninitialized constant Chef::Provider::Package::Rubygems::CurrentGemEnvironment::Bundler
Cookbook Trace:
---------------
/tmp/kitchen/cache/cookbooks/opsworks_commons/libraries/monkey_patch_rubygems_provider.rb:41:in `gem_home'
/tmp/kitchen/cache/cookbooks/opsworks_commons/libraries/monkey_patch_rubygems_provider.rb:77:in `gem_specification'
/tmp/kitchen/cache/cookbooks/aws/recipes/default.rb:19:in `from_file'
Relevant File Content:
----------------------
/tmp/kitchen/cache/cookbooks/opsworks_commons/libraries/monkey_patch_rubygems_provider.rb:
34: end
35:
36: def gem_binary_location
37: ::File.join(RbConfig::CONFIG['bindir'], "gem")
38: end
39:
40: def gem_home
41>> Bundler.bundle_path.to_s
42: end
43:
44: def refresh_ruby_load_path
45: current_loadable_paths = Dir.glob("#{gem_home}/gems/*/lib")
46:
47: # register newly installed gems into the load path
48: current_loadable_paths.each {|path| $LOAD_PATH << path unless $LOAD_PATH.include?(path)}
49:
50: # remove deleted gems from load path
[2015-07-28T22:26:34+00:00] ERROR: Running exception handlers
Running handlers complete
[2015-07-28T22:26:34+00:00] ERROR: Exception handlers complete
[2015-07-28T22:26:34+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
Chef Client failed. 0 resources updated in 14.339267805 seconds
[2015-07-28T22:26:34+00:00] ERROR: chef_gem[aws-sdk] (aws::default line 19) had an error: NameError: uninitialized constant Chef::Provider::Package::Rubygems::CurrentGemEnvironment::Bundler
[2015-07-28T22:26:34+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
>>>>>> Converge failed on instance <default-amazon>.
>>>>>> Please see .kitchen/logs/default-amazon.log for more details
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: SSH exited (1) for command: [sh -c '
sudo -E /opt/chef/bin/chef-client --local-mode --config /tmp/kitchen/client.rb --log_level auto --force-formatter --no-color --json-attributes /tmp/kitchen/dna.json --chef-zero-port 8889
']
>>>>>> ----------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment