# Rubyzip not recognized

**URL:** <https://www.ruby-forum.com/t/rubyzip-not-recognized/62984>\
**Category:** Ruby\
**Created:** [June 10, 2006, 2:41am UTC](https://www.ruby-forum.com/t/rubyzip-not-recognized/62984 "2006-06-10T02:41:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lisa-u](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/f19dbf/32.png) [@lisa-u](https://www.ruby-forum.com/u/lisa-u)\
**Post date:** [June 10, 2006, 2:41am UTC](https://www.ruby-forum.com/t/rubyzip-not-recognized/62984/1 "2006-06-10T02:41:33Z")

</div>

Hello.

I have downloaded and installed rubyzip successfully. However, Ruby  
does not recognize any of its classes.

The following is the code that I used (for practice):

def getfiles (zipFileName)  
Zip::ZipFile.open(zipFileName, Zip::ZipFile::CREATE)  
Zip::ZipFile.foreach(zipFileName) do |file|  
placeFile(path\_to\_file, file)  
end  
end

…and this is the error that I received:

test.rb:27:in `getfiles’: uninitialized constant Song::Zip (NameError)  
from test.rb:55

Not sure if I used the classes and/or methods correctly, but it does not  
seem to recognize Zip or ZipFile.

Can someone please tell me what I can do to fix this problem?

Danke!  
Lisa

---

<div class="post-metadata">

**Author:** ![lisa-u](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/f19dbf/32.png) [@lisa-u](https://www.ruby-forum.com/u/lisa-u)\
**Post date:** [June 10, 2006, 2:49am UTC](https://www.ruby-forum.com/t/rubyzip-not-recognized/62984/2 "2006-06-10T02:49:03Z")

</div>

On Sat, Jun 10, 2006 at 09:41:44AM +0900, lisa umeda wrote:

> ```
> placeFile(path_to_file, file)
> 
> ```
> 
> Can someone please tell me what I can do to fix this problem?

in the above snip doesn’t show inclusion of the zip lib:

require ‘zip/zip’

---

<div class="post-metadata">

**Author:** ![lisa-u](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/f19dbf/32.png) [@lisa-u](https://www.ruby-forum.com/u/lisa-u)\
**Post date:** [June 10, 2006, 3:08am UTC](https://www.ruby-forum.com/t/rubyzip-not-recognized/62984/3 "2006-06-10T03:08:10Z")

</div>

unknown wrote:

> On Sat, Jun 10, 2006 at 09:41:44AM +0900, lisa umeda wrote:
> 
> > ```
> > placeFile(path_to_file, file)
> > 
> > ```
> > 
> > Can someone please tell me what I can do to fix this problem?
> 
> in the above snip doesn’t show inclusion of the zip lib:
> 
> require ‘zip/zip’

Ah hah! I didn’t know how to include other libraries (didn’t need to  
for Rails, at least).

I apologize for my ignorance and thank you for the advice.

lisa
