Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-2164

require 'puppet' now throws an error in 3.5.0 with Ruby 1.8.7 as rubygems is not initialized

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Won't Fix
    • Affects Version/s: PUP 3.5.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Puppet Labs repos
      Centos 6.5
      Ruby 1.8.7

    • Template:

      Description

      We now ship rubygems-json for EL 6.x as a dependency of Puppet 3.5.0. However, Ruby 1.8.7 does not initialize the Gem search paths by default which leads to the following error:

      # yum install -y puppet-3.5.0-1.el6
       
      # ... much yum output ...
       
      # ruby -e ' require "puppet" '
      /usr/lib/ruby/site_ruby/1.8/puppet/module.rb:3:in `require': no such file to load -- json (LoadError)
      	from /usr/lib/ruby/site_ruby/1.8/puppet/module.rb:3
      	from /usr/lib/ruby/site_ruby/1.8/puppet/parser/files.rb:1:in `require'
      	from /usr/lib/ruby/site_ruby/1.8/puppet/parser/files.rb:1
      	from /usr/lib/ruby/site_ruby/1.8/puppet/parser/templatewrapper.rb:1:in `require'
      	from /usr/lib/ruby/site_ruby/1.8/puppet/parser/templatewrapper.rb:1
      	from /usr/lib/ruby/site_ruby/1.8/puppet/parser/scope.rb:6:in `require'
      	from /usr/lib/ruby/site_ruby/1.8/puppet/parser/scope.rb:6
      	from /usr/lib/ruby/site_ruby/1.8/puppet/parser/methods.rb:2:in `require'
      	from /usr/lib/ruby/site_ruby/1.8/puppet/parser/methods.rb:2
      	from /usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/method_call.rb:2:in `require'
      	from /usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/method_call.rb:2
      	from /usr/lib/ruby/site_ruby/1.8/puppet/parser/ast.rb:115:in `require'
      	from /usr/lib/ruby/site_ruby/1.8/puppet/parser/ast.rb:115
      	from /usr/lib/ruby/site_ruby/1.8/puppet/parser/parser.rb:11:in `require'
      	from /usr/lib/ruby/site_ruby/1.8/puppet/parser/parser.rb:11
      	from /usr/lib/ruby/site_ruby/1.8/puppet/parser.rb:4:in `require'
      	from /usr/lib/ruby/site_ruby/1.8/puppet/parser.rb:4
      	from /usr/lib/ruby/site_ruby/1.8/puppet.rb:240:in `require'
      	from /usr/lib/ruby/site_ruby/1.8/puppet.rb:240
      	from -e:1:in `require'
      	from -e:1
      

      The puppet command its self doesn't show the error as it has a different entry point that initializes rubygems:

      # ruby -e ' require "puppet/util/command_line" '
      

      Requiring the Puppet library works under 3.4.3:

      # yum remove -y rubygems
      # yum install -y puppet-3.4.3-1.el6
       
      # ruby -e ' require "puppet" '
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                chuck Charlie Sharpsteen
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support