The Ultimate Gravatar Gem! This gem is used to interface with the entire Gravatar API: it's not just for generating image URLs, but for connecting to and communicating with the XML-RPC API too! Additionally, it can be used to download the Gravatar image data itself, rather than just a URL to that data. This saves you the extra step of having to do so.
Gemfile gem 'gravatar-ultimate', '~> 2.0.0'
install gem install gravatar-ultimate