From: nobu@... Date: 2014-10-13T11:44:59+00:00 Subject: [ruby-core:65669] [ruby-trunk - Bug #10372] [Closed] Problem with relative paths in update-gems makefile rule (common.mk) Issue #10372 has been updated by Nobuyoshi Nakada. Status changed from Open to Closed Applied in changeset r47904. ---------- common.mk: update-gems for older BASERUBY * common.mk (update-gems): chdir to the target directory and then add the tool directory to load paths, for older BASERUBY. [Bug #10372][ruby-core:65630] ---------------------------------------- Bug #10372: Problem with relative paths in update-gems makefile rule (common.mk) https://bugs.ruby-lang.org/issues/10372#change-49401 * Author: Martin D��rst * Status: Closed * Priority: Normal * Assignee: Nobuyoshi Nakada * Category: build * Target version: current: 2.2.0 * ruby -v: ruby 2.2.0dev (2014-09-27 trunk 47722) [x86_64-cygwin] * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN ---------------------------------------- When I do > make update-gems I get the following error: ~~~ -e:1:in `require': cannot load such file -- downloader (LoadError) uncommon.mk:1084: recipe for target 'update-gems' failed make: *** [update-gems] Error 1 ~~~ The reason for this seems to be a problem with relative paths. The rule for update-gems in common.mk is as follows: ~~~makefile update-gems: PHONY $(ECHO) Downloading bundled gem files... $(Q) $(RUNRUBY) -I$(srcdir)/tool -rdownloader -answ \ -C "$(srcdir)/gems" \ -e 'gem, ver = *$$F' \ -e 'gem = "#{gem}-#{ver}.gem"' \ -e 'Downloader::RubyGems.download(gem)' \ bundled_gems ~~~ `$(srcdir)` is just '.', and so './tool' gets added to the load path, but then -C "$(srcdir)/gems" changes to the gems subdirectory, from which './tool' doesn't point to the tool directory anymore. -- https://bugs.ruby-lang.org/