Upgrade gems and fix build