workaround issue with rubygems under ruby 1.8.7

We need the fix for rubygems/rubygems#763, which was delivered in
rubygems 2.2.1.  Some travis workers are still on rubygems 2.2.0, which
causes intermittent failures.  This commit pins to rubygems 2.2.2, the
latest version at time of commit.  I don't really want to pin to a
particular version but I'm not sure how to say "at least 2.2.1" from the
command line.

See also travis-ci/travis-ci#1793.