Forum: Ruby Can I open RAR files?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Xarc (Guest)
on 2007-05-22 10:33
Hi!
How can I open .rar files from ruby?
Akbar H. (Guest)
on 2007-05-22 18:11
(Received via mailing list)
On May 22, 1:33 pm, Xarc <removed_email_address@domain.invalid> wrote:
> Hi!
> How can I open .rar files from ruby?
>
> --
> Posted viahttp://www.ruby-forum.com/.

Your best bet is using system call for unrar program.
vasudevram (Guest)
on 2007-05-22 22:31
(Received via mailing list)
On May 22, 7:05 pm, akbarhome <removed_email_address@domain.invalid> wrote:
> On May 22, 1:33 pm, Xarc <removed_email_address@domain.invalid> wrote:
>
> > Hi!
> > How can I open .rar files from ruby?
>
> > --
> > Posted viahttp://www.ruby-forum.com/.
>
> Your best bet is using system call for unrar program.

You may also be able to use popen(), assuming the command line version
of RAR supports taking arguments to specify listing the contents of
a .rar file. This way would be a bit more "interactive" than using
system() to tell RAR to list the .rar files contents to a temp file,
and then reading that file from your Ruby code.

Vasudev Ram
Dancing Bison Enterprises
http://www.dancingbison.com
tsu t. (Guest)
on 2007-05-22 22:52
Xarc wrote:
> Hi!
> How can I open .rar files from ruby?

There is no native way or right way to do that, the thing is that RAR is
a propietary file compression format. As <Akbar H.> and <vasudevram>
said that is your best shot.
Akbar H. (Guest)
on 2007-05-22 23:01
(Received via mailing list)
On May 22, 1:33 pm, Xarc <removed_email_address@domain.invalid> wrote:
> Hi!
> How can I open .rar files from ruby?
>
> --
> Posted viahttp://www.ruby-forum.com/.

Your best bet is using system call for unrar program.
Albert C. (Guest)
on 2007-05-23 11:08
Ok. Thank you! :D
This topic is locked and can not be replied to.