Issue #10822 has been updated by Vit Ondruch.


I fixed the Fedora's side. If you want to reproduce, the original operating system_rb is still available here:

http://pkgs.fedoraproject.org/cgit/ruby.git/tree/operating_system.rb?id=76bbf0976dbb90eb22dc6590cee81462844d4e24

----------------------------------------
Bug #10822: make-snapshot breaks during download of bundled gems
https://bugs.ruby-lang.org/issues/10822#change-51371

* Author: Vit Ondruch
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: ruby-2.3.0-r49483
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
~~~
... snip ...

downloading config.sub ... done
Downloading bundled gem files...
/usr/share/rubygems/rubygems/defaults/operating_system.rb:9:in `previous_but_one_dir_to': undefined method `split' for nil:NilClass (NoMethodError)
	from /usr/share/rubygems/rubygems/defaults/operating_system.rb:30:in `default_locations'
	from /usr/share/rubygems/rubygems/defaults/operating_system.rb:47:in `default_dirs'
	from /usr/share/rubygems/rubygems/defaults/operating_system.rb:70:in `default_dir'
	from /usr/share/rubygems/rubygems/basic_specification.rb:33:in `default_specifications_dir'
	from /usr/share/rubygems/rubygems/specification.rb:770:in `load_defaults'
	from /usr/share/rubygems/rubygems.rb:1239:in `<top (required)>'
	from /tmp/ruby-snapshot20150203-18908-5qkpah/ruby-2.3.0-r49483/tool/downloader.rb:41:in `require'
	from /tmp/ruby-snapshot20150203-18908-5qkpah/ruby-2.3.0-r49483/tool/downloader.rb:41:in `download'
	from -e:4:in `<main>'
/tmp/GmEfPzNs:1423: recipe for target 'update-gems' failed
make: *** [update-gems] Error 1
prerequisites failed
~~~

This is due to Ruby picking up rbconfig.rb from the current checkout, since $(RUNRUBY) adds the current directory on the load path [1]. I don't think this is right in this case.

You can reproduce this issue with Fedora's operating_system.rb [2].


[1] https://github.com/ruby/ruby/blob/trunk/common.mk#L920
[2] http://pkgs.fedoraproject.org/cgit/ruby.git/tree/operating_system.rb



-- 
https://bugs.ruby-lang.org/