There is an Ansible role which installs ruby and ruby gems.