# Rake PackageTask, undefined method exitstatus

**URL:** <https://rubytalk.org/t/rake-packagetask-undefined-method-exitstatus/34284>\
**Category:** ruby-talk\
**Created:** [7 January 2007 19:30 UTC](https://rubytalk.org/t/rake-packagetask-undefined-method-exitstatus/34284 "2007-01-07T19:30:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Melissa\_Silas](https://avatars.discourse-cdn.com/v4/letter/m/c37758/32.png) [@Melissa\_Silas](https://rubytalk.org/u/Melissa_Silas)\
**Post date:** [7 January 2007 19:30 UTC](https://rubytalk.org/t/rake-packagetask-undefined-method-exitstatus/34284/1 "2007-01-07T19:30:15Z")

</div>

Hey all,

I am trying to get some rake tasks going. I have a package task that is  
this:

Rake::PackageTask.new("deploy", ARGV[1]) do |p|  
&nbsp;&nbsp;p.need\_zip = true  
&nbsp;&nbsp;[p.name](http://p.name) = 'rubyamf'  
&nbsp;&nbsp;p.package\_files.include("lib/\*\*/\*.\*")  
&nbsp;&nbsp;p.package\_dir = "deploy"  
end

when I run 'rake package 0.5.5' it creates the directories fine (deploy  
and deploy/rubyamf-0.5.5/). But then it halts and gives me an error:

........  
........  
cd deploy  
zip -r rubyamf-0.5.5.zip rubyamf-0.5.5  
rake aborted!  
undefined method `exitstatus' for nil:NilClass

Anyone have an idea what this might be from?

---

<div class="post-metadata">

**Author:** ![Jan\_Svitok](https://avatars.discourse-cdn.com/v4/letter/j/cab0a1/32.png) [@Jan\_Svitok](https://rubytalk.org/u/Jan_Svitok)\
**Post date:** [7 January 2007 20:54 UTC](https://rubytalk.org/t/rake-packagetask-undefined-method-exitstatus/34284/2 "2007-01-07T20:54:50Z")

</div>

pretty blind guess: run with --trace and see what it will display

> **···**
>
> On 1/7/07, warhero \<beingthexemplarylists@gmail.com\> wrote:
> 
> > Hey all,
> > 
> > I am trying to get some rake tasks going. I have a package task that is  
> > this:
> > 
> > Rake::PackageTask.new("deploy", ARGV[1]) do |p|  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;p.need\_zip = true  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;p.name = 'rubyamf'  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;p.package\_files.include("lib/\*\*/\*.\*")  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;p.package\_dir = "deploy"  
> > end
> > 
> > when I run 'rake package 0.5.5' it creates the directories fine (deploy  
> > and deploy/rubyamf-0.5.5/). But then it halts and gives me an error:
> > 
> > ........  
> > cd deploy  
> > zip -r rubyamf-0.5.5.zip rubyamf-0.5.5  
> > rake aborted!  
> > undefined method `exitstatus' for nil:NilClass
> > 
> > Anyone have an idea what this might be from?

---

<div class="post-metadata">

**Author:** ![Mike\_Harris1](https://avatars.discourse-cdn.com/v4/letter/m/e5b9ba/32.png) [@Mike\_Harris1](https://rubytalk.org/u/Mike_Harris1)\
**Post date:** [8 January 2007 05:04 UTC](https://rubytalk.org/t/rake-packagetask-undefined-method-exitstatus/34284/3 "2007-01-08T05:04:50Z")

</div>

warhero wrote:

> Hey all,
> 
> I am trying to get some rake tasks going. I have a package task that is  
> this:
> 
> Rake::PackageTask.new("deploy", ARGV[1]) do |p|  
> &nbsp;&nbsp;p.need\_zip = true  
> &nbsp;&nbsp;p.name = 'rubyamf'  
> &nbsp;&nbsp;p.package\_files.include("lib/\*\*/\*.\*")  
> &nbsp;&nbsp;p.package\_dir = "deploy"  
> end
> 
> when I run 'rake package 0.5.5' it creates the directories fine (deploy  
> and deploy/rubyamf-0.5.5/). But then it halts and gives me an error:
> 
> ........  
> ........  
> cd deploy  
> zip -r rubyamf-0.5.5.zip rubyamf-0.5.5  
> rake aborted!  
> undefined method `exitstatus' for nil:NilClass
> 
> Anyone have an idea what this might be from?

It means the zip executable isn't present on your system, or in your  
path. The software on my machine appears to be InfoZIP  
([http://www.info-zip.org/Zip.html\](http://www.info-zip.org/Zip.html%5C)), although I'm not sure if it came  
with Ruby or where it came from.

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![Ryan\_Davis1](https://yyz1.discourse-cdn.com/flex029/user_avatar/rubytalk.org/ryan_davis1/32/1848_2.png) [@Ryan\_Davis1](https://rubytalk.org/u/Ryan_Davis1)\
**Post date:** [9 January 2007 17:06 UTC](https://rubytalk.org/t/rake-packagetask-undefined-method-exitstatus/34284/4 "2007-01-09T17:06:10Z")

</div>

Although it probably won't fix this problem (I too suspect that zip is missing) writing your rakefile using hoe will alleviate a lot of your efforts for development/deployment.

> **···**
>
> On Jan 7, 2007, at 2:30 PM, warhero wrote:
> 
> > Hey all,
> > 
> > I am trying to get some rake tasks going. I have a package task that is  
> > this:

---

<div class="post-metadata">

**Author:** ![James\_Britt3](https://avatars.discourse-cdn.com/v4/letter/j/b782af/32.png) [@James\_Britt3](https://rubytalk.org/u/James_Britt3)\
**Post date:** [11 January 2007 21:28 UTC](https://rubytalk.org/t/rake-packagetask-undefined-method-exitstatus/34284/5 "2007-01-11T21:28:10Z")

</div>

warhero wrote:

> ........  
> cd deploy  
> zip -r rubyamf-0.5.5.zip rubyamf-0.5.5  
> rake aborted!  
> undefined method `exitstatus' for nil:NilClass
> 
> Anyone have an idea what this might be from?

Are you on Windows?

> **···**
>
> --  
> James Britt
> 
> [http://www.rubyaz.org](http://www.rubyaz.org) - Hacking in the Desert  
> [http://www.jamesbritt.com](http://www.jamesbritt.com) - Playing with Better Toys

---

<div class="post-metadata">

**Author:** ![Melissa\_Silas](https://avatars.discourse-cdn.com/v4/letter/m/c37758/32.png) [@Melissa\_Silas](https://rubytalk.org/u/Melissa_Silas)\
**Post date:** [11 January 2007 21:03 UTC](https://rubytalk.org/t/rake-packagetask-undefined-method-exitstatus/34284/6 "2007-01-11T21:03:04Z")

</div>

Cool thanks, I have to try it out. I figured it was something with the zip  
files. but wasn't sure about the missing package..

thanks..

> **···**
>
> On 1/8/07, Mike Harris \<gfunk913@gmail.com\> wrote:
> 
> > warhero wrote:  
> > \> Hey all,  
> > \>  
> > \> I am trying to get some rake tasks going. I have a package task that is  
> > \> this:  
> > \>  
> > \> Rake::PackageTask.new("deploy", ARGV[1]) do |p|  
> > \> p.need\_zip = true  
> > \> p.name = 'rubyamf'  
> > \> p.package\_files.include("lib/\*\*/\*.\*")  
> > \> p.package\_dir = "deploy"  
> > \> end  
> > \>  
> > \> when I run 'rake package 0.5.5' it creates the directories fine (deploy  
> > \> and deploy/rubyamf-0.5.5/). But then it halts and gives me an error:  
> > \>  
> > \> ........  
> > \> cd deploy  
> > \> zip -r rubyamf-0.5.5.zip rubyamf-0.5.5  
> > \> rake aborted!  
> > \> undefined method `exitstatus' for nil:NilClass  
> > \>  
> > \> Anyone have an idea what this might be from?
> > 
> > It means the zip executable isn't present on your system, or in your  
> > path. The software on my machine appears to be InfoZIP  
> > ([http://www.info-zip.org/Zip.html\](http://www.info-zip.org/Zip.html%5C)), although I'm not sure if it came  
> > with Ruby or where it came from.
> > 
> > --  
> > Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![Melissa\_Silas](https://avatars.discourse-cdn.com/v4/letter/m/c37758/32.png) [@Melissa\_Silas](https://rubytalk.org/u/Melissa_Silas)\
**Post date:** [12 January 2007 01:00 UTC](https://rubytalk.org/t/rake-packagetask-undefined-method-exitstatus/34284/7 "2007-01-12T01:00:19Z")

</div>

yes. windows.

I can't find that info-zip anywhere.. Doesn't seem to be on those links..

> **···**
>
> On 1/11/07, James Britt \<james.britt@gmail.com\> wrote:
> 
> > warhero wrote:  
> > \> ........  
> > \> cd deploy  
> > \> zip -r rubyamf-0.5.5.zip rubyamf-0.5.5  
> > \> rake aborted!  
> > \> undefined method `exitstatus' for nil:NilClass  
> > \>  
> > \> Anyone have an idea what this might be from?
> > 
> > Are you on Windows?
> > 
> > --  
> > James Britt
> > 
> > [http://www.rubyaz.org](http://www.rubyaz.org) - Hacking in the Desert  
> > [http://www.jamesbritt.com](http://www.jamesbritt.com) - Playing with Better Toys
