The naive way will just load the highest-numbered version you have installed:
require 'rack'
When you have rubygems loaded, this is equivalent to:
gem 'rack', '>=0'
You can specify exact and relative dependencies easily. There are a fuckton of frameworks to handle this for you, many of them oriented around copying the depended-upon gems into your app when it's deployed, as is common in the Java world.