Uploaded Image Corrupted with JRuby 1.7.10
For those using JRuby. Image upload may not work with this gem. Try the following code on JRuby:
f = File.open("test.png")
obj = f.read(f.size)
f.size and obj.size are not the same. It causes content-length and stream size not the same, and image file is corrupted.
With which version(s) of JRuby are you seeing this problem?
It's in the title. I didn't try any new version since then.
Oh, yes it is. I missed that. Was hoping to that a newer version of JRuby since the issue was filed would have fixed the problem, but don't know.
@sodabrew I am not using JRuby for a long time. Are you still seeing this in the latest JRuby? I had a workaround for this issue at that time.
It would be good to make a spec for this to confirm correct behaviour - PR welcome.