Skip to content

Commit d051a4d

Browse files
Alexandr Evstigneevvalich
authored andcommitted
Install dependencies into the same root as debugger itself (#172)
* Install dependencies into the same root as debugger itself Helps with --user-install on system ruby
1 parent cae6dd6 commit d051a4d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ext/mkrf_conf.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
install_dir = File.expand_path("../../../..", __FILE__)
12
jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
23
rbx = defined?(RUBY_ENGINE) && 'rbx' == RUBY_ENGINE
34

@@ -27,11 +28,11 @@ def already_installed(dep)
2728

2829
begin
2930
puts "Installing base gem"
30-
inst = Gem::DependencyInstaller.new :prerelease => dep.prerelease?
31+
inst = Gem::DependencyInstaller.new(:prerelease => dep.prerelease?, :install_dir => install_dir)
3132
inst.install dep
3233
rescue
3334
begin
34-
inst = Gem::DependencyInstaller.new(:prerelease => true)
35+
inst = Gem::DependencyInstaller.new(:prerelease => true, :install_dir => install_dir)
3536
inst.install dep
3637
rescue Exception => e
3738
puts e

0 commit comments

Comments
 (0)