2011-05-06 11 views
5

Albacore'da zip göreviyle sıkıştırmaya çalışıyorum, ancak bir hata alıyorum. IronRuby ile ilgili bir sorun mu var?Albacore zip görevi IronRuby'de neden başarısız oluyor?

task :publish => :build do 
    Rake::Task[:service].invoke 
    Rake::Task[:site].invoke 
    Rake::Task[:zip_svc].invoke 
end 

zip :zip_svc do |zip| 
    zip.directories_to_zip 'publish' 
    zip.output_file = 'Svc.zip' 
    zip.output_path = File.dirname(__FILE__) 
end 

Hata>

** Invoke zip_svc (first_time) 
** Execute zip_svc 
rake aborted! 
wrong number of arguments (1 for 2) 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rubyzip-0.9.4/lib/zip/zip.rb:1113:in `<<' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rubyzip-0.9.4/lib/zip/zip.rb:1062:in `<<' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rubyzip-0.9.4/lib/zip/ioextras.rb:125:in `write' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rubyzip-0.9.4/lib/zip/ioextras.rb:9:in `copy_stream' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rubyzip-0.9.4/lib/zip/zip.rb:832:in `write_to_zip_output_stream' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rubyzip-0.9.4/lib/zip/zip.rb:772:in `get_input_stream' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rubyzip-0.9.4/lib/zip/zip.rb:832:in `write_to_zip_output_stream' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rubyzip-0.9.4/lib/zip/zip.rb:1515:in `commit' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rubyzip-0.9.4/lib/zip/zip.rb:1153:in `each' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rubyzip-0.9.4/lib/zip/zip.rb:1153:in `each' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rubyzip-0.9.4/lib/zip/zip.rb:1515:in `commit' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rubyzip-0.9.4/lib/zip/zip.rb:963:in `open' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rubyzip-0.9.4/lib/zip/zip.rb:1512:in `commit' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rubyzip-0.9.4/lib/zip/zip.rb:1601:in `on_success_replace' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rubyzip-0.9.4/lib/zip/zip.rb:1510:in `commit' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rubyzip-0.9.4/lib/zip/zip.rb:1525:in `close' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rubyzip-0.9.4/lib/zip/zip.rb:1415:in `open' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/albacore-0.2.5/lib/albacore/zipdirectory.rb:28:in `execute' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/albacore-0.2.5/lib/albacore/support/createtask.rb:24:in `zip' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:636:in `call' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:636:in `execute' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:631:in `each' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:631:in `execute' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain' 
c:/IronRuby/Lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' 
C:/Users/Thiago/projetos/Cosan/mapaestrutura/rakefile.rb:8 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:636:in `call' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:636:in `execute' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:631:in `each' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:631:in `execute' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain' 
c:/IronRuby/Lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in `each' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2001:in `run' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:1998:in `run' 
c:/IronRuby/Lib/ruby/gems/1.9.1/gems/rake-0.8.7/bin/rake:31 
C:/IronRuby/bin/rake:19:in `load' 
C:/IronRuby/bin/rake:19 

cevap

4

Maalesef zip görev IronRuby düzgün çalışmaz birkaç maddeden biridir. Birkaç kez baktım, ama rubyzip lib için de uygun bir yedek bulamadım. 7-zip (ücretsiz/çok iyi bir araç) gibi harici bir araç kullanmanızı ve bunu exec görevinden çağırmanızı tavsiye ederim.