Issue #11714 has been updated by Jeff McCune.

Status changed from Investigating to In Topic Branch Pending Review
Branch set to https://github.com/puppetlabs/puppet/pull/321

# envpuppet #

It turns out the use of windows style slashes in the RUBYLIB environment 
variable is the problem here.

I've submitted envpuppet.bat to the ext directory of Puppet to help address 
this problem.  This allows Puppet to run from source easily on Windows 
platforms.

Pull Request: <https://github.com/puppetlabs/puppet/pull/321>
----------------------------------------
Bug #11714: puppet --version returns Error: Unknown Puppet subcommand 'apply' 
on windows
https://projects.puppetlabs.com/issues/11714

Author: Jeff McCune
Status: In Topic Branch Pending Review
Priority: Normal
Assignee: Jeff McCune
Category: windows
Target version: 2.7.x
Affected Puppet version: 2.7.9
Keywords: windows apply subcommand puppet
Branch: https://github.com/puppetlabs/puppet/pull/321


# Overview #

I'm getting this error with Puppet 2.7.9, Facter 1.6.x, and Ruby 1.9.7p334 on 
Windows 2003 x64.

<pre>
C:\>envpuppet puppet --version --debug --trace                                
Error: Unknown Puppet subcommand 'apply'                                        
See 'puppet help' for help on available puppet subcommands
</pre>

# Expected Behavior #

I'd expect this error not to be raised and the version string 2.7.9 to be 
printed.

# Actual Behavior #

See above error message

# Steps to reproduce #

I'm running Puppet from source using this envpuppet.bat wrapper script in my 
PATH.  Facter and Puppet are located on a windows mapped drive readable by my 
security context and process.

<pre>
@echo off
SETLOCAL

SET RUBYLIB=Z:\vagrant\src\facter\lib;Z:\vagrant\src\puppet\lib;%RUBYLIB%
SET PATH=Z:\vagrant\src\facter\bin;Z:\vagrant\src\puppet\bin;%PATH%

ruby -S %*
</pre>

 * Windows 2003 x64 patched up.
 * Ruby 1.8.7 p334
 * Gems:

<pre>
C:\>gem list                                                         
                                                                             
*** LOCAL GEMS ***                                                             
                                                                             
sys-admin (1.5.6 x86-mingw32)                                                  
win32-api (1.4.8 x86-mingw32)                                                   
win32-dir (0.3.7)                                                            
win32-process (0.6.5)                                                          
win32-security (0.1.2)                                                         
win32-service (0.7.1 x86-mswin32-60)                                         
win32-taskscheduler (0.2.1)                                                    
windows-api (0.4.0)                                                            
windows-pr (1.2.1)
</pre>

# Additional Information #

Using this envpuppet wrapper script, Facter appears to work just fine running 
out of source leading me to believe my RUBYLIB and PATH are setup correctly:

<pre>
C:\>envpuppet facter --version                                                
1.6.4                                                                           
C:\>envpuppet facter operatingsystem                                          
windows
</pre>



-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to