Many Ruby 1.8’s tempfile libraries have a bug that can cause the close method to raise an exception. Subclass it and fix it.
# File lib/phusion_passenger/utils/rewindable_input.rb, line 72 def _close @tmpfile.close if @tmpfile @data[1] = nil if @data @tmpfile = nil end