[Rubygems-developers] SourceIndex not respecting gemhome/gempath entries on ~/.gemrc

Chad Woolley thewoolleyman at gmail.com
Fri Oct 3 13:58:59 EDT 2008

This is with the latest trunk r1895.

$ cat ~/.gemrc
:gemhome: /Users/woolley/.gem/ruby/1.8
- /Users/woolley/.gem/ruby/1.8

$ gem env
RubyGems Environment:
  - INSTALLATION DIRECTORY: /Users/woolley/.gem/ruby/1.8
  - EXECUTABLE DIRECTORY: /Users/woolley/.gem/ruby/1.8/bin
     - /Users/woolley/.gem/ruby/1.8

# NOTE: These are just the gems under ~/.gem, and I must have the non-symbol
entries for gemhome and gempath in gemrc to get just these gems.
$ gem list

*** LOCAL GEMS ***

cmdparse (2.0.2)
facets (2.4.3)
geminstaller (0.4.5)
gettalong-webgen (
github (0.1.1)
hoe (1.7.0)
launchy (0.3.2)
maruku (0.5.9)
rack (0.4.0)
rake (0.8.3)
ramaze (2008.06)
RedCloth (4.0.4)
sake (1.0.15)
Selenium (1.1.14)
syntax (1.0.0)
webgen (0.4.2)

# This picked up all the gems, including the ones in my system dir - not
just the ones listed above which are in ~/.gem
$ irb
>> si = Gem::SourceIndex.from_installed_gems
>> d = Gem::Dependency.new('', '>=0')
>> si.search(d).map {|s| s.name}
=> ["RedCloth", "RedCloth", "Selenium", "actionmailer", "actionmailer",
"actionpack", "actionpack", "actionwebservice", "actionwebservice",
"activerecord", "activerecord", "activesupport", "activesupport",
"acts_as_ferret", "capistrano", "cgi_multipart_eof_fix",
"cgi_multipart_eof_fix", "cmdparse", "daemons", "daemons", "dnssd",
"facets", "fastthread", "fastthread", "fcgi", "ferret", "gem_plugin",
"gem_plugin", "geminstaller", "gettalong-webgen", "github", "highline",
"hoe", "hpricot", "launchy", "libxml-ruby", "maruku", "mongrel", "needle",
"net-sftp", "net-ssh", "rack", "rails", "rails", "rake", "rake", "ramaze",
"ruby-openid", "ruby-yadis", "rubynode", "sake", "sources", "sqlite3-ruby",
"syntax", "termios", "webgen"]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rubygems-developers/attachments/20081003/db617dc7/attachment.html>

More information about the Rubygems-developers mailing list