Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
None
-
Release Engineering
-
Release Engineering Kanban
-
Needs Assessment
-
Bug Fix
-
-
Needs Assessment
Description
The facter gemspec is pinned to ruby 2.1.7 which is causing gem installation errors.
https://github.com/puppetlabs/facter/blob/master/lib/gemspec.in#L19
facter-3.11.8 requires ruby version ~> 2.1.7, which is incompatible with the current version, ruby 2.4.5p335 |
Steps to reproduce:
- Install the puppet-agent (any version will work)
- Install pdk the gem (/opt/puppetlabs/puppet/bin/gem install pdk)
- Create a new module using the pdk (pdk new module test)
- cd test && pdk unit test
The failure should occur as it tries to load the facter gem using the specification.
Workaround
Remove the patch version from the 2.1.7 in the gemspec for post install issues
Gem::Specification.new do |s| |
s.name = "facter" |
version = "3.11.8" |
mdata = version.match(/(\d+\.\d+\.\d+)/)
|
s.version = mdata ? mdata[1] : version s.required_rubygems_version = Gem::Requirement.new(">= 0") |
s.authors = ["Puppet Labs"] |
s.date = "2015-10-22" |
s.description = "You can prove anything with facts!" |
s.email = "info@puppetlabs.com" |
s.files = ["bin/facter"] |
s.homepage = "https://puppetlabs.com" |
s.require_paths = ["lib"] |
s.summary = "Facter, a system inventory tool" |
s.specification_version = 3 |
s.required_ruby_version = '~> 2.1' # <----- change from 2.1.7 to 2.1 |
end
|
Otherwise this would need to be fixed permanently here :
https://github.com/puppetlabs/facter/blob/master/lib/gemspec.in#L19 or possibly elsewhere in the code during the compilation process that produces the gemspec file.
Note: this is somewhat related to https://tickets.puppetlabs.com/browse/PA-2670 in that you may have to fix that issue as well.