当我使用下面的代码时,我收到以下错误信息:
无法将StringIO转换为String (TypeError)
。array_of_lines = []
Zip::ZipInputStream::open(open("URL for zipped file", "rb")) do |io|
file = io.get_next_entry
puts "Downloading file #{file}"
array_of_lines = io.readlines
print "Downloaded ", array_of_lines.count, " elements.", "\n"
end
有人能帮忙吗?提前感谢。