@kgish, I ran into this same issue and reported it on the repo here: https://github.com/plasticine/middleman-imageoptim/issues/51
I found a forked version of the gem that fixes the issue, and referenced it on that issue as well. Basically, just change your call to
middleman-imageoptim in your
Gemfile to this:
gem "middleman-imageoptim", "~> 0.2.1", :git => "https://github.com/georgecheng/middleman-imageoptim"
bundle install and try to build again.