Hello everyone I am using rubyzip gem for zipping files. Zipping local files are good and except zipping remote files. Example(my code): save_path="xxx/xx" image_list = ["http://xxxx.xx.image.jpg","http://xxxx.xx.image.jpg"] Zip::ZipFile.open(save_dir, Zip::ZipFile::CREATE) { |zipfile| image_list.each do |image| zipfile.add(image, save_pathr + ''/'' + image) end } I am gettting error as *"No such file or directory - http://xxxx.xx.image.jpg"* * * how can zip my remote files? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/e61F3H1gXQEJ. For more options, visit https://groups.google.com/groups/opt_out.
Save the image to your local filesystem, then pass those locations to the method, rather than passing HTTP urls directly. -- Dheeraj Kumar On Tuesday 8 January 2013 at 6:51 PM, Saravanan P wrote:> Hello everyone > > I am using rubyzip gem for zipping files. > > Zipping local files are good and except zipping remote files. > > Example(my code): > save_path="xxx/xx" > image_list = ["http://xxxx.xx.image.jpg","http://xxxx.xx.image.jpg"] > Zip::ZipFile.open(save_dir, Zip::ZipFile::CREATE) { |zipfile| > image_list.each do |image| > zipfile.add(image, save_pathr + ''/'' + image) > end > } > > > I am gettting error as "No such file or directory - http://xxxx.xx.image.jpg" > > how can zip my remote files? > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org (mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org). > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org (mailto:rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org). > To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/e61F3H1gXQEJ. > For more options, visit https://groups.google.com/groups/opt_out. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
There is no other way? Because it take time to download from server to local. On Tue, Jan 8, 2013 at 6:55 PM, Dheeraj Kumar <a.dheeraj.kumar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> passing-- Regards by Saravanan.P -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
If the resulting archive is supposed to have the data from all the files, it stands to reason the source files have to be read in order to be zipped up. Why don''t you download the files on a remote server, perhaps a EC2 instance, then run your script to zip them up, and then download the resulting zip file? -- Dheeraj Kumar On Tuesday 8 January 2013 at 6:58 PM, Saravanan P wrote:> There is no other way? Because it take time to download from server to local. > > On Tue, Jan 8, 2013 at 6:55 PM, Dheeraj Kumar <a.dheeraj.kumar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org (mailto:a.dheeraj.kumar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org)> wrote: > > passing > > > -- > Regards by > Saravanan.P > > > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org (mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org). > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org (mailto:rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org). > For more options, visit https://groups.google.com/groups/opt_out. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On 8 January 2013 13:28, Saravanan P <saravanan.p-tks5Z7IV8F8RmelmmXo44Q@public.gmane.org> wrote:> There is no other way? Because it take time to download from server to > local.How can you expect to zip it without fetching the file first, from the machine xxxx.xx in your example? Do you expect the rubyzip gem to somehow run on that machine and then send you the zipped file? Colin> > On Tue, Jan 8, 2013 at 6:55 PM, Dheeraj Kumar <a.dheeraj.kumar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: >> >> passing > > > > > -- > Regards by > Saravanan.P > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
I am using amazon s3 service. I dont know about EC2. I am zipping multi images which uploaded by customer in one day. In this case, the images will be more. so if i download and added into zip file, it may take comeplte too long. On Tue, Jan 8, 2013 at 7:03 PM, Dheeraj Kumar <a.dheeraj.kumar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> EC2-- Regards by Saravanan.P -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Well, if you''re expecting to somehow zip files on the file server, you''re highly mistaken. Here''s an article on fast zipping in S3: http://www.w2lessons.com/2012/01/fast-zipping-in-amazon-s3.html Wait, you know S3 but you don''t know EC2? Huh. -- Dheeraj Kumar On Tuesday 8 January 2013 at 7:14 PM, Saravanan P wrote:> I am using amazon s3 service. I dont know about EC2. > I am zipping multi images which uploaded by customer in one day. > In this case, the images will be more. so if i download and added into zip file, it may take comeplte too long. > > On Tue, Jan 8, 2013 at 7:03 PM, Dheeraj Kumar <a.dheeraj.kumar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org (mailto:a.dheeraj.kumar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org)> wrote: > > EC2 > > > -- > Regards by > Saravanan.P > > > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org (mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org). > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org (mailto:rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org). > For more options, visit https://groups.google.com/groups/opt_out. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.