move ruby check out of rubygems functions back to the cli, fix #2382