Uploaded image for project: 'Facter'
  1. Facter
  2. FACT-1918

Facter is pinned to ruby version 2.1.7

    Details

    • Template:
    • Team:
      Release Engineering
    • Sprint:
      Release Engineering Kanban
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      The facter gemspec was pinned to ruby 2.1.7 which is causing gem installation errors.
      Changed the pinned version to 2.1
      Show
      The facter gemspec was pinned to ruby 2.1.7 which is causing gem installation errors. Changed the pinned version to 2.1
    • QA Risk Assessment:
      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:

      1. Install the puppet-agent  (any version will work)
      2. Install pdk the gem (/opt/puppetlabs/puppet/bin/gem install pdk)
      3. Create a new module using the pdk (pdk new module test)
      4. 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.

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  morgan Morgan Rhodes
                  Reporter:
                  corey.osman Corey Osman
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Zendesk Support