upgrade gems

Lots of changes (maybe too many) included in this, but tried to keep the commits small in case we need to do incremental manual testing. P.S. [Transpec](https://github.com/yujinakayama/transpec) is *so useful*.