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

Can't gem install puppet with some versions of bundler and ruby 1.9.3

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 4.10.2
    • Component/s: None
    • Template:
    • Team:
      Agent
    • Story Points:
      1
    • Sprint:
      Agent 2017-05-31
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      In Puppet 4.10.1 a change was made that may prevent the Puppet gem (or Puppet run from source) from being able to load and run on Ruby 1.9.3 due to a bug in Bundler. This issue would not have impacted Puppet installed from packages.
    • QA Risk Assessment:
      No Action

      Description

      Running puppet --version on ruby 1.9.3 and ubuntu 14.04 fails due to https://github.com/bundler/bundler/issues/3187

      root@cb37bnfmc142c5l:~# puppet --version
      /usr/lib/ruby/1.9.1/rubygems/version.rb:191:in `strip!': can't modify frozen String (RuntimeError)
      	from /usr/lib/ruby/1.9.1/rubygems/version.rb:191:in `initialize'
      	from /var/lib/gems/1.9.1/gems/puppet-4.10.1/lib/puppet.rb:3:in `new'
      	from /var/lib/gems/1.9.1/gems/puppet-4.10.1/lib/puppet.rb:3:in `<top (required)>'
      	from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
      	from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
      	from /var/lib/gems/1.9.1/gems/puppet-4.10.1/lib/puppet/util/command_line.rb:12:in `<top (required)>'
      

      The problem is Gem::Version.new(RUBY_VERSION), which apparently tries to strip! a frozen string.

      A common pattern is to dup the string.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            josh Josh Cooper
            QA Contact:
            Eric Delaney
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support