哪个zip库与Ruby 1.9.2兼容? [英] What zip library works well with Ruby 1.9.2?

查看:92
本文介绍了哪个zip库与Ruby 1.9.2兼容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我以前在Ruby 1.8.7中使用过rubyzip宝石,但是我听说rubyzip在ruby 1.9.2中不能很好地工作.

I used the rubyzip gem in Ruby 1.8.7 before, but I heard rubyzip doesn't work well with ruby 1.9.2.

哪些zip库与Ruby 1.9.2兼容?

What zip libraries work well with Ruby 1.9.2?

推荐答案

您是否真的尝试过将rubyzip与1.9.2一起使用?似乎对我来说很好:

Have you actually tried using rubyzip with 1.9.2? Seems to work fine for me:

>> RUBY_VERSION 
#=> "1.9.2"
>> require 'zip/zip' 
#=> true
>> Zip::ZipFile.foreach(File.expand_path("~/Downloads/Archive.zip")) { |f| p f } 
#=> [bartxt, footxt]
bar.txt
foo.txt

这篇关于哪个zip库与Ruby 1.9.2兼容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆