On Mar 13, 2007, at 05:41, Martin DeMello wrote:
> Finally gotten around to changing my 'require_gem' code, and I've
> noticed that for many gems, the name of the file to "require" is not
> the same as the gem's name.

99.9% of the time you don't need require_gem.

> Furthermore, there's no way to find out
> what file I *do* need to require other than looking at the directory
> structure of the gem. An option to gem that would list all requirable
> files would be a nice addition.

You mean "gem contents"?

$ gem help contents
Usage: gem contents [options]

   Options:
     -v, --version VERSION            Specify version of gem to contents
     -l, --list                       List the files inside a Gem
     -s, --spec-dir a,b,c             Search for gems under specific  
paths
     -V, --verbose                    Be verbose when showing status

   Common Options:
         --source URL                 Use URL as the remote source  
for gems
     -p, --[no-]http-proxy [URL]      Use HTTP proxy for remote  
operations
     -h, --help                       Get help on this command
         --config-file FILE           Use this config file instead of  
default
         --backtrace                  Show stack backtrace on errors
         --debug                      Turn on Ruby debugging

   Summary:
     Display the contents of the installed gems
$ gem contents memcache-client
/usr/local/lib/ruby/gems/1.8/gems/memcache-client-1.3.0/History.txt
/usr/local/lib/ruby/gems/1.8/gems/memcache-client-1.3.0/LICENSE.txt
/usr/local/lib/ruby/gems/1.8/gems/memcache-client-1.3.0/Manifest.txt
/usr/local/lib/ruby/gems/1.8/gems/memcache-client-1.3.0/README.txt
/usr/local/lib/ruby/gems/1.8/gems/memcache-client-1.3.0/Rakefile
/usr/local/lib/ruby/gems/1.8/gems/memcache-client-1.3.0/lib/memcache.rb
/usr/local/lib/ruby/gems/1.8/gems/memcache-client-1.3.0/lib/ 
memcache_util.rb
/usr/local/lib/ruby/gems/1.8/gems/memcache-client-1.3.0/test/ 
test_mem_cache.rb