Gem azure-auth-token_provider
It's a simple gem to obtain Azure MSI OAuth2.0 access token. It works in both Azure Cloud environment and local development environment.
Gem is available at RubyGems.org -https://rubygems.org/gems/azure-auth-token_provider