1

Running Puppet Enterprise 3.7.

The Agent machine is a Windows 2012 Server R2 box.

Question: Where do I put the gemrc file so that Puppet's internal ruby can find it?

On Linux, the place to put the file seems to be /opt/puppet/etc/gemrc.

The goal: instruct puppet to NOT look on rubygems.org for Gems, but instead look at our internal Gemserver.

Paul Chernoch
  • 155
  • 1
  • 6

2 Answers2

3

I've put it in the user's (user that runs Puppet) home (%HOMEPATH%). This should be one of the paths RubyGems looks for the gemrc file.

Belmin Fernandez
  • 10,629
  • 26
  • 84
  • 145
  • I am aware that there is where Ruby normally looks for a gemrc on Windows. Is that where the Ruby internal to Puppet will look? I take nothing for granted. – Paul Chernoch Jan 22 '15 at 20:33
  • Yes, this place is one of the directories where Ruby looks, but not the one I am looking for. See my self-answer. – Paul Chernoch Jan 23 '15 at 13:32
2

After experimentation, this is where I put the gemrc file:

C:\ProgramData

Be sure to remove the leading dot from the filename.

In this directory, the gemrc applies to all users, not just the currently logged in user, which is the way we want it. If it was just for a single user, Belmin's answer would have been the correct answer.

Paul Chernoch
  • 155
  • 1
  • 6