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

Recipe Compile Error in /tmp/vagrant-chef/ /cookbooks/compat_resource/libraries/autoload.rb #56

Open
karneaud opened this issue Aug 15, 2016 · 0 comments

Comments

@karneaud
Copy link

Tried getting a vagrant up and running using librarian and ran into this error

the log output trace shows

==> default: 
==> default: 
==> default: RuntimeError
==> default: ------------
==> default: This resource is written with Chef 12.5 custom resources, and requires at least Chef 12.0 used with the compat_resource cookbook, it will not work with Chef 11.x clients, and those users must pin their cookbooks to older versions or upgrade.
==> default: 
==> default: 
==> default: Cookbook Trace:
==> default: ---------------
==> default:   /tmp/vagrant-chef/fadf53bfd4e8a6624b5f3f128b0258ff/cookbooks/compat_resource/libraries/autoload.rb:2:in `<top (required)>'
==> default: 
==> default: 
==> default: Relevant File Content:
==> default: ----------------------
==> default: /tmp/vagrant-chef/fadf53bfd4e8a6624b5f3f128b0258ff/cookbooks/compat_resource/libraries/autoload.rb:
==> default: 
==> default:   1:  unless Gem::Requirement.new(">= 12.0").satisfied_by?(Gem::Version.new(Chef::VERSION))
==> default:   2>>   raise "This resource is written with Chef 12.5 custom resources, and requires at least Chef 12.0 used with the compat_resource cookbook, it will not work with Chef 11.x clients, and those users must pin their cookbooks to older versions or upgrade."
==> default:   3:  end
==> default:   4:  
==> default:   5:  # If the gem is already activated rather than the cookbook, then we fail if our version is DIFFERENT.
==> default:   6:  # The user said they wanted this cookbook version, they need to have this cookbook version.
==> default:   7:  # NOTE: if the gem is installed but on a different version, we simply don't care: the cookbook version wins.
==> default:   8:  #       If another gem depends on a different version being there, rubygems will correctly throw the error.
==> default:   9:  if Gem.loaded_specs["compat_resource"]
==> default:  10:    # Read our current version
==> default:  11:    version_rb = IO.read(File.expand_path("../../files/lib/compat_resource/version.rb", __FILE__))
==> default: 
==> default: 
==> default: 
==> default: 
==> default: [2016-08-15T04:29:04+00:00] ERROR: Running exception handlers
==> default: [2016-08-15T04:29:04+00:00] ERROR: Exception handlers complete
==> default: Chef Client failed. 0 resources updated
==> default: [2016-08-15T04:29:04+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> default: [2016-08-15T04:29:04+00:00] FATAL: RuntimeError: This resource is written with Chef 12.5 custom resources, and requires at least Chef 12.0 used with the compat_resource cookbook, it will not work with Chef 11.x clients, and those users must pin their cookbooks to older versions or upgrade.
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

1 participant