You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.
There is a monkeypatch for Tempfile at the bottom of lib/paperclip/iostream.rb that breaks Tempfile#size when it is run from JRuby.
It looks likes this is due to a different Tempfile implementation in JRuby. The @tmpfile instance variable is never set, so Tempfile#size always returns 0.
Tested on Windows XP and Fedora (JRuby only) with Ruby 1.8.6 and JRuby 1.3.1
The text was updated successfully, but these errors were encountered:
Since paperclip's Tempfile monkeypatch is meant to fix a bug on Windows, it should just be patched on Windows:
if defined? Tempfile and /mswin|win32|mingw|bccwin|cygwin/ =~ RUBY_PLATFORM
class Tempfile
def size
if @tmpfile
@tmpfile.fsync
@tmpfile.flush
@tmpfile.stat.size
else
0
end
end
end
end
There is a monkeypatch for Tempfile at the bottom of lib/paperclip/iostream.rb that breaks Tempfile#size when it is run from JRuby.
It looks likes this is due to a different Tempfile implementation in JRuby. The @tmpfile instance variable is never set, so Tempfile#size always returns 0.
Tested on Windows XP and Fedora (JRuby only) with Ruby 1.8.6 and JRuby 1.3.1
The text was updated successfully, but these errors were encountered: