[Rake-devel] Problem with sh on Windows

Berger, Daniel Daniel.Berger at qwest.com
Mon Apr 30 10:19:31 EDT 2007


Windows XP Pro, SP2
Ruby 1.8.5/1.8.6 (one click)
Rake 0.7.3 (also tried 0.7.2 and 0.7.1)

Here's a simple task I have setup:

task :install_gem do
   ruby 'ptools.gemspec'
   file = Dir['*.gem'].first
   sh "gem install #{file}"
end

This works fine on Unix, but on my Windows box it does this:

C:\Documents and Settings\djberge\workspace\ptools>rake install_gem
--trace
(in C:/Documents and Settings/djberge/workspace/ptools)
** Invoke install_gem (first_time)
** Execute install_gem
C:/ruby/bin/ruby ptools.gemspec
  Successfully built RubyGem
  Name: ptools
  Version: 1.1.3
  File: ptools-1.1.3.gem
File: 'ptools-1.1.3.gem'
gem install ptools-1.1.3.gem
rake aborted!
Command failed with status (0): [gem install ptools-1.1.3.gem...]
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:719:in `sh'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:726:in `call'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:726:in `sh'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:805:in `sh'
C:/Documents and Settings/djberge/workspace/ptools/rakefile:13
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `call'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `execute'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `each'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `execute'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:362:in `invoke'
C:/ruby/lib/ruby/1.8/thread.rb:135:in `synchronize'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in `invoke'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in
`top_level'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in `each'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in
`top_level'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:in
`standard_exception_handling'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1733:in
`top_level'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1711:in `run'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:in
`standard_exception_handling'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1708:in `run'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/bin/rake:7
C:/ruby/bin/rake.bat:20:in `load'
C:/ruby/bin/rake.bat:20

Is this just a known limitation of sh on Windows? I could have sworn it
worked in older versions, but perhaps my memory is failing.

Thanks,

Dan


This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly 
prohibited and may be unlawful.  If you have received this communication 
in error, please immediately notify the sender by reply e-mail and destroy 
all copies of the communication and any attachments.


More information about the Rake-devel mailing list