amazon web services - how to download a zip file from s3 bucket using ruby -


i able zip required files(using ruby gems of aws sdk) & upload them s3 bucket. when tried download zip files s3 local server & unzip them , geeting following error...

[2013-05-06t07:19:37+00:00] fatal: typeerror: aws_unzip[db_unzip] (aws::unzip line 14) had error: typeerror: can't dup nilclass

even when try unzip manually, can see "zip files corrupted"...but zip file present in s3 location not corrupted(i tested extract them manually downloading them, extracted well).... can 1 doing mistake in reading zip files bucket local server????? when downloading getting corrupted...

my code

file.open(dd, 'w') {|f| f.write(obj.read.force_encoding('utf-8'))} 

try 'wb' mode - zip binary file. force_encoding suspicious.


Comments