8000 Set `GEM_PATH` environment variable in runruby.rb · ruby/ruby@ea8da3d · GitHub
[go: up one dir, main page]

Skip to content

Commit ea8da3d

Browse files
committed
Set GEM_PATH environment variable in runruby.rb
1 parent 375ae38 commit ea8da3d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tool/runruby.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,12 @@ def File.realpath(*args)
122122
end
123123
env["RUBYLIB"] = $:.replace(libs).join(File::PATH_SEPARATOR)
124124

125+
gem_path = [abs_archdir, srcdir].map {|d| File.realdirpath(".bundle", d)}
126+
if e = ENV["GEM_PATH"]
127+
gem_path |= e.split(File::PATH_SEPARATOR)
128+
end
129+
env["GEM_PATH"] = gem_path.join(File::PATH_SEPARATOR)
130+
125131
libruby_so = File.join(abs_archdir, config['LIBRUBY_SO'])
126132
if File.file?(libruby_so)
127133
if e = config['LIBPATHENV'] and !e.empty?

0 commit comments

Comments
 (0)
0