Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 355873 - dev-lang/ruby-1.9.2: /etc/gemrc ignored due to etc.so issue
Summary: dev-lang/ruby-1.9.2: /etc/gemrc ignored due to etc.so issue
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-21 17:37 UTC by Sven Schwyn (svoop)
Modified: 2011-02-21 17:59 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Schwyn (svoop) 2011-02-21 17:37:23 UTC
The global config file for the gem command is /etc/gemrc. The directory /etc is read from etc.so in /usr/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb (line 51):

system_config_path =
  begin
    require 'etc.so'
    Etc.sysconfdir
  rescue LoadError
    '/etc'
  end

For some reason, ruby19's Etc.sysconfdir returns "$(DESTDIR)/etc" instead of the correct path "/etc" (as does ruby18). As a consequence, the gemrc file is expected in "$(DESTDIR)/etc/gemrc" and thus not found.

An easy way to check whether the path is correct:

# eselect-ruby set ruby19
# irb
> Gem::ConfigFile::SYSTEM_WIDE_CONFIG_FILE   # => "$(DESTDIR)/etc/gemrc"


Reproducible: Always

Steps to Reproduce:
Comment 1 Sven Schwyn (svoop) 2011-02-21 17:45:43 UTC
The problem seems not to be platform dependant, at least it occurs at least on both x86_64 (Gentoo) and i386 (32bit Gentoo Prefix on Intel Mac).
Comment 2 Sven Schwyn (svoop) 2011-02-21 17:59:26 UTC
This is a bug upstream which has been fixed, a version bump will take care of it.

http://redmine.ruby-lang.org/issues/show/3832