I had the same problem; in my case it arose from treating the file
reference returned from Zip::ZipFile.each{} as a string (like
Dir.each{}) instead of whatever it actually is. Add ".name" where you
need the file name. This code gave the error:

Zip::ZipFile.open(file) { |zip_file|
zip_file.each { |f|
myLogger("Inspecting file #{f}")
next unless f.file?
...

...and this worked:

Zip::ZipFile.open(file) { |zip_file|
zip_file.each { |f|
myLogger("Inspecting file #{f.name}")
next unless f.file?
...

Cheers,

BillR

--
Posted via http://www.ruby-forum.com/.

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedJan 12, '12 at 9:33p
activeJan 12, '12 at 9:33p
posts1
users1
websiterubyonrails.org
irc#RubyOnRails

1 user in discussion

Bill Reinke: 1 post

People

Translate

site design / logo © 2022 Grokbase