Don't know if subexec was designed to work in a Windows environment, but I had to make this change to get MiniMagick to work, as 'export' isn't a recognised command. My solution might not be elegant, so I would welcome your comments/thoughts.
Modified to work on Windows
with your file i have: invalid byte sequence in UTF-8 error when upload image
Can I second this pull request. tekn0t's fix is needed to to get mini_magick working properly for windows users. The previous couple of releases of mm don't work properly (on 1.8.7 anyways..) because the output response is coming back as nil.
Tiny recommendation though, the conditional could be changed to:
if RUBY_PLATFORM =~ /mswin|mingw|cygwin/
to include cygwin users also.. if there are any..
The old ruby_platform for windows was mswin32 so win32 and mswin are just doing the same thing.
Cheers though Andrew. Much appreciated fix.
I'll add in the fix from 2potatocakes after this merge.