Recently at work, we encountered a bug in Puppet. I decided to try to fix the bug in my free time. The first step in this process is getting it working using a git clone. I went through the instructions, then I tried to use rake and I started getting this error:
PS C:\Puppet-Code\Puppet> rake
rake/gempackagetask is deprecated. Use rubygems/package_task instead
The system cannot find the path specified.
rake aborted!
No such file or directory - pwd
(See full trace by running task with --trace)
I ran it with --trace and got this:
PS C:\Puppet-Code\Puppet> rake --trace
rake/gempackagetask is deprecated. Use rubygems/package_task instead
The system cannot find the path specified.
rake aborted!
No such file or directory - pwd
ext/packaging/tasks/00_utils.rake:198:in ``'
ext/packaging/tasks/00_utils.rake:198:in `get_pwd_version'
ext/packaging/tasks/00_utils.rake:171:in `get_dash_version'
ext/packaging/tasks/10_setupvars.rake:65:in `<top (required)>'
C:/Puppet-Code/Puppet/Rakefile:25:in `load'
C:/Puppet-Code/Puppet/Rakefile:25:in `block in <top (required)>'
C:/Puppet-Code/Puppet/Rakefile:25:in `each'
C:/Puppet-Code/Puppet/Rakefile:25:in `<top (required)>'
C:/Ruby193/lib/ruby/1.9.1/rake/rake_module.rb:25:in `load'
C:/Ruby193/lib/ruby/1.9.1/rake/rake_module.rb:25:in `load_rakefile'
C:/Ruby193/lib/ruby/1.9.1/rake/application.rb:501:in `raw_load_rakefile'
C:/Ruby193/lib/ruby/1.9.1/rake/application.rb:82:in `block in load_rakefile'
C:/Ruby193/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
C:/Ruby193/lib/ruby/1.9.1/rake/application.rb:81:in `load_rakefile'
C:/Ruby193/lib/ruby/1.9.1/rake/application.rb:65:in `block in run'
C:/Ruby193/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
C:/Ruby193/lib/ruby/1.9.1/rake/application.rb:63:in `run'
C:/Ruby193/bin/rake:32:in `<main>'
After looking at the file I found that this was the line in question:
%x{pwd}.strip.split('.')[-1]
I am using Powershell to run the rake file and when I run pwd directly in Powershell it works. However, if I run it from within the irb using %x{pwd} I just get an error message that there is no such file or directory 'pwd'. My understanding is that %x just passes that command to the shell (which I think is Powershell because that's where I'm running it from).
Can anyone explain why %x{pwd} is not working and what, if anything, I can do to fix it?
EDIT: I am using Powershell on Windows.
Thanks.