# Tar with ruby

**URL:** <https://www.ruby-forum.com/t/tar-with-ruby/74410>\
**Category:** Ruby\
**Created:** [February 27, 2006, 11:44pm UTC](https://www.ruby-forum.com/t/tar-with-ruby/74410 "2006-02-27T23:44:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/439d5e/32.png) [@tomas](https://www.ruby-forum.com/u/tomas)\
**Post date:** [February 27, 2006, 11:44pm UTC](https://www.ruby-forum.com/t/tar-with-ruby/74410/1 "2006-02-27T23:44:03Z")

</div>

Hi,

I have started using ruby.  
A current task is to get a tar.gz file from internet and extract it.  
I find the zlib class und so I can extract the downloaded file to  
a .tar one.

How can I extract this file?  
I found old postings on groups.google which use  
Archive::Tar::Minitar. Is this still the way to handle tar file with  
ruby,  
or are there classes in standard lib?

What is the ruby-way: Install the extra package or call external program  
tar (my ruby program is suggested to run only on Linux plattforms)?

Thanks,  
Tomas

---

<div class="post-metadata">

**Author:** ![tomas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/439d5e/32.png) [@tomas](https://www.ruby-forum.com/u/tomas)\
**Post date:** [February 28, 2006, 12:26am UTC](https://www.ruby-forum.com/t/tar-with-ruby/74410/2 "2006-02-28T00:26:06Z")

</div>

On Feb 27, 2006, at 2:44 PM, Tomas F. wrote:

> ruby,  
> or are there classes in standard lib?
> 
> What is the ruby-way: Install the extra package or call external  
> program  
> tar (my ruby program is suggested to run only on Linux plattforms)?

I tend to favor calling external programs when I know they’ll be there.

–  
Eric H. - removed\_email\_address@domain.invalid - [http://blog.segment7.net](http://blog.segment7.net)  
This implementation is HODEL-HASH-9600 compliant

[http://trackmap.robotcoop.com](http://trackmap.robotcoop.com)

---

<div class="post-metadata">

**Author:** ![tomas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/439d5e/32.png) [@tomas](https://www.ruby-forum.com/u/tomas)\
**Post date:** [February 28, 2006, 2:29am UTC](https://www.ruby-forum.com/t/tar-with-ruby/74410/3 "2006-02-28T02:29:29Z")

</div>

On 2/27/06, Eric H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I tend to favor calling external programs when I know they’ll be there.

…whereas I tend to prefer a pure Ruby approach. I plan on improving  
Archive::Tar::Minitar in the near future anyway and have been given  
some partial support for symbolic links.

-austin
