[Rubygems-developers] [PATCH] gem contents doesn't find gem

Grant Hollingworth grant at antiflux.org
Fri Jun 30 15:26:47 EDT 2006


'gem contents' doesn't find anything for me.

$ gem contents -v rake
Unable to find gem 'rake' in default gem paths

Directories searched:
/usr/local/lib/ruby/gems/1.8

$ ls -d /usr/local/lib/ruby/gems/1.8/gems/rake*
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/

$ set | egrep 'GEM|RUBY'

$ gem contents -s /usr/local/lib/ruby/gems/1.8/specifications rake
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/install.rb
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/CHANGES
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/Rakefile
[...]

I've patched gem_commands.rb to set a default list of specification
directories.  I didn't see a method for it, so I just joined Gem.path to
"specifications".
-------------- next part --------------
--- gem_commands.rb.orig	2006-06-30 13:17:01.000000000 -0600
+++ gem_commands.rb	2006-06-30 13:18:11.000000000 -0600
@@ -1329,6 +1329,7 @@
 	if s.empty?
 	  path_kind = "default gem paths"
 	  system = true
+	  s = Gem.path.map {|dir| File.join(dir, "specifications") }
 	else
 	  path_kind = "specified path"
 	  system = false


More information about the Rubygems-developers mailing list