|
osdir.com mailing list archive F.A.Q. -since 2001! |
|
|
|
Subject: Problem with sh on Windows - msg#00005List: lang.ruby.rake
by Date: Prev Date Index by Thread: Prev Thread Index
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.
Thread at a glance:
Previous Message by Date:Re: gem task runs task instead of packaging dir when dir and task names are the sameaslak hellesoy wrote: > How to reproduce: > > 1) Download and install the 1.8.6-25 version of the One Click Ruby > installer for Windows > 2) Check out the RSpec core: svn co > svn://rubyforge.org/var/svn/rspec/trunk/rspec/trunk/rspec rspc > 3) cd rspec > 4) rake gem > > Apparently, instead of packaging the examples, failing_examples and > spec directories, Rake instead decides to run the tasks by these > names. The failing_examples task fails (and is intended to fail), but > Rake shouldn't be running it in the first place - it should package > the dirs. > > This behaviour has only been observed on Windows, with Ruby 1.8.6-25 > and 1.8.5-something - both with Rake 1.7.2. > > I'd rather not rename tasks and/or directories to work around this. Interesting. MacOSX and Cygwin on windows both work, but I've confirmed the problem with the plain windows installation. I don't know why yet. Thanks for the report. -- -- Jim Weirich jim@xxxxxxxxxxxxxxxx http://onestepback.org -- In theory, practice and theory are the same. -- In practice, they are different. Previous Message by Thread:gem task runs task instead of packaging dir when dir and task names are the sameHow to reproduce: 1) Download and install the 1.8.6-25 version of the One Click Ruby installer for Windows 2) Check out the RSpec core: svn co svn://rubyforge.org/var/svn/rspec/trunk/rspec/trunk/rspec rspc 3) cd rspec 4) rake gem Apparently, instead of packaging the examples, failing_examples and spec directories, Rake instead decides to run the tasks by these names. The failing_examples task fails (and is intended to fail), but Rake shouldn't be running it in the first place - it should package the dirs. This behaviour has only been observed on Windows, with Ruby 1.8.6-25 and 1.8.5-something - both with Rake 1.7.2. I'd rather not rename tasks and/or directories to work around this. Cheers, Aslak
blog comments powered by Disqus
|
|