This howto guide is based on RubyGems version 0.8.11 which was the current version at the time of writing this guide.
Download the mod_RubyGems source code from: http://rubyforge.org/frs/download.php/5207/rubygems-0.8.11.tgz
Extract the .tgz file to a suitable location:
tar zxvf /usr/local/src/rubygems-0.8.11.tgz
Run the setup command:
Now compile the program:
Finally, install ruby:
It is now time to configure Apache to run with mod_ruby. Please see this post.