Require rubygems for 1.8.7 in main library

We only required rubygems in the CLI and tests.