Ask Your Question
2

librarian-puppet on windows

asked 2013-06-21 18:49:29 -0500

BaltoStar gravatar image

updated 2014-01-28 11:47:07 -0500

Windows Server 2008 R2 Standard SP1 Puppet Agent for Windows v3.2.2 Ruby v1.9.3

c:\>gem install librarian-puppet
c:\>cd myrepo
c:\myrepo>librarian-puppet init

Unable to load puppet. Either install it using native packages for your platform (eg .deb, .rpm, .dmg, etc) or as a gem (gem install puppet).

I am surprised because according to Programs applet, Puppet v3.2.1 is installed ( I assume by the Puppet Agent for Windows install ).

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2013-06-21 20:37:17 -0500

GregLarkin gravatar image

Did you open a Puppet command prompt with elevated privileges using the "Start Command Prompt with Puppet" menu?

If not, please do that, retry your command and post any output back here again for further troubleshooting.

edit flag offensive delete link more

Comments

Thanks that worked. So the error message is misleading ? The actual problem is that Puppet could not be loaded due to insufficient privileges ?

BaltoStar gravatar imageBaltoStar ( 2013-06-21 20:55:03 -0500 )edit

I haven't used Puppet on Windows yet, so my thought was that some env vars weren't set correctly with the default command prompt. The menu pick that I ...(more)

GregLarkin gravatar imageGregLarkin ( 2013-06-22 06:11:38 -0500 )edit

Also , on a Windows 7 box that has the puppet gem installed ( but no Puppet Agent for Windows ) , I am also getting this error. What is the solution ?

BaltoStar gravatar imageBaltoStar ( 2014-01-27 19:44:25 -0500 )edit
1

answered 2013-08-05 14:14:07 -0500

This is due to environment variables not being set correctly. I ran into this problem. If you call environment.bat in the puppet bin directory you should be able to continue with librarian.

In your batch file (prior to running powershell) call

SET PATH=%PATH%;%SystemDrive%\Program Files (x86)\Puppet Labs\Puppet\bin;%SystemDrive%\Program Files\Puppet Labs\Puppet\bin;

echo Ensuring environment for puppet
call environment.bat

Then you should be able to continue without issues.

edit flag offensive delete link more

Comments

Thanks Rob. When you say "in your batch file" what batch file are you referring to ?

BaltoStar gravatar imageBaltoStar ( 2014-01-27 19:17:59 -0500 )edit

BaltoStar - If you are running this straight from the command line then you wouldn't have a batch file, but assuming you would end up scripting this in some way ...(more)

rob gravatar imagerob ( 2014-01-28 10:01:01 -0500 )edit

Ok let's say I am running from command line, and further let's say I do not have Puppet Agent for Windows installed ( so the elevated privileges command prompt ...(more)

BaltoStar gravatar imageBaltoStar ( 2014-01-28 11:45:50 -0500 )edit

BaltoStar - You would need to install Puppet.

rob gravatar imagerob ( 2014-01-29 01:43:51 -0500 )edit

Yes Puppet gem is already installed -- evidenced by `where puppet` returning `C:\Ruby193\bin\puppet`. Just as in the Puppet Agent for Windows case, the error is misleading. This error ...(more)

BaltoStar gravatar imageBaltoStar ( 2014-01-29 02:12:52 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-06-21 18:49:29 -0500

Seen: 2,051 times

Last updated: Jan 28 '14