question about tar in Ruby

G

Ghelani, Vidhi

------_=_NextPart_001_01C51518.4E382332
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hi,=20

=20

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.=20

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=20

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

=20

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

=20

Any help is appreciated,

Thanx,

Vidhi.

=20

=20


------_=_NextPart_001_01C51518.4E382332--
 
D

David N. Springer

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
 
A

Austin Ziegler

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top