How to extract a .rar archive with Ruby?
After doing some additional reading on the subject it seems that any gems that were for this are basically abandoned. But, you can brew install unrar
and use that from Ruby system('unrar l your_file.rar')
.
ffi-libarchive provides a gem-based solution. It works for rar files even though they don't specifically mention it (see issue #151). Add this to your application's Gemfile:
gem 'ffi-libarchive'
and then execute:
$ bundle