Uploaded image for project: 'Puppet Enterprise (moved to puppet.atlassian.net)'
  1. Puppet Enterprise (moved to puppet.atlassian.net)
  2. ENTERPRISE-833

Gem provider does not honour system wide gem sources settings

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Blocker
    • Resolution: Unresolved
    • PE 2015.2.0
    • None
    • None
    • None

    Description

      When I run the following code:
      package

      { 'random-client': ensure => installed, provider => 'gem', source => 'http://example.net:2000', }

      with puppet apply <filename.pp> it fails to install the gem.

      It fails because it tries to install the gem from rubygems.org and it will not find the gem there ever. I have set gem sources both in ~/.gemrc and in /etc/gemrc but these files does not get read by puppet. The documentation suggests that adding the source property will get it to use the correct repository but this does not work either. The puppet agent version is v4.2.1gem

      This is the error message:
      Error: Execution of '/usr/bin/gem install --source http://example.net:2000 random-client' returned 1: ERROR: Could not find a valid gem 'random-client' (>= 0) in any repository
      ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
      Errno::ETIMEDOUT: Connection timed out - connect(2) (https://rubygems.org/latest_specs.4.8.gz)
      Error: /Stage[main]/Main/Package[random-client]/ensure: change from absent to present failed: Execution of '/usr/bin/gem install --source http://example.net:2000 random-client' returned 1: ERROR: Could not find a valid gem 'random-client' (>= 0) in any repository
      ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
      Errno::ETIMEDOUT: Connection timed out - connect(2) (https://rubygems.org/latest_specs.4.8.gz)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ggeldenhuis-old Gerhardus Geldenhuis
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:

                Zendesk Support