We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b8a90b9 commit 00c7184Copy full SHA for 00c7184
ext/mkrf_conf.rb
@@ -1,4 +1,10 @@
1
jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
2
+
3
+def already_installed(dep)
4
+ Gem::DependencyInstaller.new(:domain => :local).find_gems_with_sources(dep) ||
5
+ Gem::DependencyInstaller.new(:domain => :local,:prerelease => true).find_gems_with_sources(dep)
6
+end
7
8
unless jruby
9
require 'rubygems'
10
require 'rubygems/command.rb'
@@ -29,7 +35,7 @@
29
35
puts e.backtrace.join "\n "
30
36
exit(1)
31
37
end
32
- end unless Gem::DependencyInstaller.new(:domain => :local).find_gems_with_sources(dep)
38
+ end unless already_installed(dep)
33
39
34
40
41
# create dummy rakefile to indicate success
0 commit comments