[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

question about tar in Ruby

Ghelani, Vidhi

2/17/2005 5:45:00 PM

Hi,



I am trying to package a .tar.gz file using ruby. I have packaged a
tar file using the same ruby code and it works perfectly fine. However,
when I use the same code for a .tar.gz file, it give me an error while
trying to open it . It says that this is not a tar file. I know I need
to change something in my ruby code.

There are a few things that I changed i.e. 1) the extension from .tar to
tar.gz

However there is a command at the end of the code which does

Tar -cf #.tar.gz file # a folder which contains the
install and license and everything to do with this file.



Now I know that I need to change the above code, since this is not a tar
file. Does anyone know wot to do ??



Any help is appreciated,

Thanx,

Vidhi.





2 Answers

David N. Springer

2/17/2005 6:14:00 PM

0

Ghelani, Vidhi wrote:

>Hi,
>
>
>
>I am trying to package a .tar.gz file using ruby. I have packaged a
>.tar file using the same ruby code and it works perfectly fine. However,
>when I use the same code for a .tar.gz file, it give me an error while
>trying to open it . It says that this is not a tar file. I know I need
>to change something in my ruby code.
>
>There are a few things that I changed i.e. 1) the extension from .tar to
>.tar.gz
>
>However there is a command at the end of the code which does
>
> Tar -cf #.tar.gz file # a folder which contains the
>install and license and everything to do with this file.
>
>
>
>Now I know that I need to change the above code, since this is not a tar
>file. Does anyone know wot to do ??
>
>
>
>Any help is appreciated,
>
>Thanx,
>
>Vidhi.
>
>
change tar -cf #.tar.gz file to tar -czf #.tar.gz file

--
David




Austin Ziegler

2/17/2005 6:18:00 PM

0

On Fri, 18 Feb 2005 02:44:33 +0900, Ghelani, Vidhi
<vidhi.ghelani@intel.com> wrote:
> I am trying to package a .tar.gz file using ruby. I have packaged a
> .tar file using the same ruby code and it works perfectly fine. However,
> when I use the same code for a .tar.gz file, it give me an error while
> trying to open it . It says that this is not a tar file. I know I need
> to change something in my ruby code.
>
> There are a few things that I changed i.e. 1) the extension from .tar to
> .tar.gz
>
> However there is a command at the end of the code which does
>
> Tar -cf #.tar.gz file # a folder which contains the
> install and license and everything to do with this file.
>
> Now I know that I need to change the above code, since this is not a tar
> file. Does anyone know wot to do ??

Yes. Look at Archive::Tar::Minitar on RubyForge under the Ruwiki project.

-austin
--
Austin Ziegler * halostatue@gmail.com
* Alternate: austin@halostatue.ca