The following guide is non-authoritative and probably will not work for you. It is simply the commands I use to reproduce a particular environment: Ruby 1.8.7 with Gems 1.8.10 and Sinatra (using Thin).
Before we get started, here is some information about my system:
1. Install the necessary Ubuntu packages (not sure if you need all of these).
Note: For Ubuntu 11.10 use libreadline-gplv2-dev instead of libreadline5-dev
2. Install RVM. At the time of writing this, the Ruby and Gems in the official repo are a little out of date. Note: I am running this as root for a multi-user install (more on this can be found here.)
3. Add necessary users to the RVM group.
4. Now you need to restart your shell for the changes to take affect. You can try to
source the necessary files, but it is just as easy to exit and restart a new session.
5. At this point, it is a good idea to run
rvm notes and
rvm requirements and do/install anything it tells you (at the time of writing this, there was nothing extra I needed to install. By the time you read this, that probably will not be the case)
6. I was having some major problems with zlib, so I had to install that (here for more information).
7. Install Ruby 1.8.7 and set it as the default
8. Install Sinatra and Thin