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

Invalid byte sequence in US-ASCII on gem install

    XMLWordPrintable

Details

    • Bug
    • Status: Accepted
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • Hide

      I was able to install Bundler 1.2.5 with puppet

      Show
      I was able to install Bundler 1.2.5 with puppet
    • Coremunity

    Description

      Using Package provider Gem to install bundler-1.2.5 results on "Invalid byte sequence in US-ASCII". The locale in my machine is correct, en_GB.UTF-8, but when the execute the gem install, puppet changes it to US-ASCII, and fails with the "Invalid byte sequence..."

      I have found that puppet overrides locales in util execution, but you can skip it by setting "override_locale". I not found any way to pass this. Removing this lines works perfectly.

      https://github.com/puppetlabs/puppet/blob/master/lib/puppet/util/execution.rb#L265

              if (options[:override_locale]) then
                # loop over them and clear them
                Puppet::Util::POSIX::LOCALE_ENV_VARS.each { |name| ENV.delete(name) }
                # set LANG and LC_ALL to 'C' so that the command will have consistent, predictable output
                # it's OK to manipulate these directly rather than, e.g., via "withenv", because we are in
                # a forked process.
                ENV['LANG'] = 'C'
                ENV['LC_ALL'] = 'C'
              end
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              TLmaK0 Hugo Freire
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Zendesk Support