[ 
https://issues.apache.org/jira/browse/BUILDR-462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12884314#action_12884314
 ] 

Rhett Sutphin commented on BUILDR-462:
--------------------------------------

Your buildfile works for me on ruby 1.8.7-p174 and 1.9.1-p378:

$ ruby -v
ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.3.0]
$ buildr clean package
(in /private/tmp/buildr-problem, development)
Cleaning stuff
Building stuff
Packaging stuff
Packaging ziperror-1.0.0.jar
Running integration tests...
Completed in 0.030s

And:

$ ruby -v
ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-darwin10.3.0]
$ buildr clean package
(in /private/tmp/buildr-problem, development)
Cleaning stuff
Building stuff
Packaging stuff
Packaging ziperror-1.0.0.jar
Running integration tests...
Completed in 0.269s

One odd thing in your stack trace is that rubyzip-0.9.4 is the active version.  
Buildr has a locked dependency on 0.9.1, so this shouldn't be possible.  

And, actually, if I install rubyzip 0.9.4, I can reproduce your issue under 
1.9.1 but not 1.8.7.  I have heard that the rubygems that is built in to 1.9 
has problems activating specific versions of gems -- perhaps this is an example 
of that.  If so, using ruby 1.8.7 would be a workaround.

> undefined method `length' for -1:Fixnum
> ---------------------------------------
>
>                 Key: BUILDR-462
>                 URL: https://issues.apache.org/jira/browse/BUILDR-462
>             Project: Buildr
>          Issue Type: Bug
>          Components: Packaging
>    Affects Versions: 1.4
>         Environment: ruby 1.9.1p378 (2010-01-10 revision 26273) [x86_64-linux]
>            Reporter: Kristof Jozsa
>
> kjo...@walrus:/tmp/test$ ls
> buildfile
> kjo...@walrus:/tmp/test$ cat buildfile 
> define 'stuff' do
>   project.group = 'x'
>   project.version = '1.0.0'
>   package :jar, :id => 'ziperror'
> end
> kjo...@walrus:/tmp/test$ buildr package
> (in /tmp/test, development)
> Building stuff
> Packaging stuff
> Packaging ziperror-1.0.0.jar
> Buildr aborted!
> NoMethodError : undefined method `length' for -1:Fixnum
> (See full trace by running task with --trace)
> kjo...@walrus:/tmp/test$ buildr package --trace 2>&1 | grep -A3 NoMethod
> NoMethodError : undefined method `length' for -1:Fixnum
> /usr/lib/ruby/gems/1.9.1/gems/rubyzip-0.9.4/lib/zip/zip.rb:732:in 
> `write_c_dir_entry'
> /usr/lib/ruby/gems/1.9.1/gems/buildr-1.4.0/lib/buildr/packaging/zip.rb:37:in 
> `block in write_to_stream'
> /usr/lib/ruby/gems/1.9.1/gems/buildr-1.4.0/lib/buildr/packaging/zip.rb:37:in 
> `each'
> kjo...@walrus:/tmp/test$ 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to