Skip to content


open uri too many open files. UriAdapter missing close statement #1022

trcarden opened this Issue · 2 comments

3 participants


When importing a bunch of URIs into paperclip i use the UriAdapter. It works great. However its missing a close call (see below). You need to either pass a block to uri-open. Since the code doesn't lend itself to a block just close it after the copy.

module Paperclip
  class UriAdapter < AbstractAdapter
   def initialize(target)
    @target = target
    @content = download_content
    @tempfile = copy_to_tempfile(@content)

   # Missing this:
   # @content.close


+1 I guess


Should be fixed here: d71cc2d

@djcp djcp closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.