Update failing due to rate limiting by RubyGems

I faced this issue today and I’m a little confused. We don’t install bundler when we install discourse. Then how can we even update it at all?

UPDATE:
I realized that discourse installation tries to install bundle. and I can see its already the latest version:

Successfully installed bundler-1.16.2

So it seems its not fixing the problem. Is there any other solutions?