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.
class UriAdapter < AbstractAdapter
@target = target
@content = download_content
@tempfile = copy_to_tempfile(@content)
# Missing this:
+1 I guess
Should be fixed here: d71cc2d