This might be a known issue with Rubygems 2.5.1. This will help:
Copygem update --system
gem update --system