This might be a known issue with Rubygems 2.5.1. This will help:
gem update --system
Save money by migrating from AWS to our fully managed hosting in Germany.