Posts JRuby / PaperClip
Post
Cancel

JRuby / PaperClip

Hello fellow developer stuck with JRuby, Paperclip file size = 0 issue :)

Apparently the Paperclip workaround to report the proper file size doesn’t work with the current implementation of JRuby (Windows XP).

This “might” work (not thoroughly tested): iostream.rb

1
2
3
4
5
6
7
8
9
10
11
if defined? Tempfile
  class Tempfile
    def size
        if self.path
          File.size(self.path)
        else
          0
        end
     end
   end
end

The issue is reported on github with other suggested fixes

This helped me today, almost a year later!
The issue is still around.
http://jira.codehaus.org/browse/JRUBY-4820

Contents

Search Results