Skip to content

Conversation

@mpapis
Copy link
Contributor

@mpapis mpapis commented Mar 7, 2012

for the line of rubies 1.8 rubygems did not load sysconfdir and defaulted back to /etc which lead to problems like this: https://gist.github.com/1981223

@mpapis
Copy link
Contributor Author

mpapis commented Mar 7, 2012

@djberg96 that would work via two exceptions, I have changed code to use first RbConfig::CONFIG['sysconfdir'] which should be the primary source of sysconfdir (at least for 1.8)

@evanphx evanphx closed this in c08a425 Mar 7, 2012
@mpapis
Copy link
Contributor Author

mpapis commented Mar 7, 2012

to keep cross references https://bugs.ruby-lang.org/issues/6121

jcast pushed a commit to jcasts/rubygems that referenced this pull request Mar 12, 2012
@bearded
Copy link

bearded commented Mar 18, 2012

$ git checkout origin/1.8 -b 1.8 Branch 1.8 set up to track remote branch 1.8 from origin. Switched to a new branch '1.8' 
$ ruby setup.rb RubyGems 1.8.18 installed == 1.8.18 / 2012-03-11 * 4 bug fixes: * Use Psych API to emit more compatible YAML * Download and write inside `gem fetch` directly. Fixes #289 * Honor sysconfdir on 1.8. Fixes #291 * Search everywhere for a spec for `gem spec`. Fixes #288 * Fix Gem.all_load_path. Fixes #171 ------------------------------------------------------------------------------ RubyGems installed the following executables: /usr/local/rvm/rubies/ruby-1.9.1-p431/bin/gem 
$ gem -v /usr/local/rvm/rubies/ruby-1.9.1-p431/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:71:in `rescue in rescue in <class:ConfigFile>': uninitialized constant Gem::ConfigFile::RbConfig (NameError) from /usr/local/rvm/rubies/ruby-1.9.1-p431/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:53:in `rescue in <class:ConfigFile>' from /usr/local/rvm/rubies/ruby-1.9.1-p431/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:49:in `<class:ConfigFile>' from /usr/local/rvm/rubies/ruby-1.9.1-p431/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:28:in `<top (required)>' from /usr/local/rvm/rubies/ruby-1.9.1-p431/lib/ruby/site_ruby/1.9.1/rubygems/gem_runner.rb:9:in `require' from /usr/local/rvm/rubies/ruby-1.9.1-p431/lib/ruby/site_ruby/1.9.1/rubygems/gem_runner.rb:9:in `<top (required)>' from /usr/local/rvm/rubies/ruby-1.9.1-p431/bin/gem:9:in `require' from /usr/local/rvm/rubies/ruby-1.9.1-p431/bin/gem:9:in `<main>' 
@mpapis
Copy link
Contributor Author

mpapis commented Mar 18, 2012

this might be because there is no explicit require "rbconfig" in the fix like it was in mine proposed code ...

@bearded
Copy link

bearded commented Mar 18, 2012

@mpapis, yes, require "rbconfig" solves this problem, and gem -v works on 1.8.7, 1.9.1, 1.9.2 and 1.9.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants