Closed benhocker closed 8 years ago
working here and tests are passing https://travis-ci.org/maestrodev/puppet-blacksmith/jobs/42844197
Getting the same error on ruby-2.1.0, ruby-2.1.1, and ruby-2.1.5.
The problem is with metadata-json-lint. It has a dependency in the semantic gem, while Puppet includes it vendored. I guess they are different versions. Removing metadata-json-lint from Gemfile it works correctly
Running metadata-json-lint 0.0.5 and puppet-blacksmith 3.1.1 causes this error for me, removing puppet-blacksmith or metadata-json-lint resolves this error (puppet 3.7.3). Is this an incompatibility between these two projects rather than metadata-json-lint with puppet?
no, this is a problem between metadata-json-lint
and puppet
. blacksmith just happens to require puppet
for some tools, and that's why the error happens
@carlossg thanks for the explanation, that makes sense.
Try adding require 'puppet/vendor/semantic/lib/semantic'
to the beginning of your Rakefile, or before any puppet references
That does seem to work with metadata-json-lint 0.0.5. Is that the recommended solution?
This fixes it for me with latest gems
Gemfile
source "https://rubygems.org"
gem 'rake', :require => false
gem 'puppet-blacksmith', :require => false
gem 'metadata-json-lint', :require => false
gem 'puppetlabs_spec_helper', :require => false
Rakefile:
require 'puppet/vendor/semantic/lib/semantic'
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet_blacksmith/rake_tasks'
bundle exec rake
Try adding require 'puppet/vendor/semantic/lib/semantic' to the beginning of your Rakefile, or before any puppet references
First: This is very helpful, thank you.
However, note that adding this line seems to break Puppet versions <= 3.5.
LoadError: cannot load such file -- puppet/vendor/semantic/lib/semantic
You can do
require 'puppet/version'
require 'puppet/vendor/semantic/lib/semantic' unless Puppet.version.to_f <3.6
Hello. This looks like it's been resolved. Please re-open if it hasn't been resolved.
I'm getting the following after updating to puppet 3.7.3 and puppet-blacksmith 3.1.1:
Below is my Gemfile:
Below is a gem list: