summaryrefslogtreecommitdiff
path: root/lib/bundler/cli/doctor.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/cli/doctor.rb')
-rw-r--r--lib/bundler/cli/doctor.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/bundler/cli/doctor.rb b/lib/bundler/cli/doctor.rb
index 43f1ca92e2..74444ad0ce 100644
--- a/lib/bundler/cli/doctor.rb
+++ b/lib/bundler/cli/doctor.rb
@@ -2,6 +2,7 @@
require "rbconfig"
require "shellwords"
+require "fiddle"
module Bundler
class CLI::Doctor
@@ -71,7 +72,14 @@ module Bundler
definition.specs.each do |spec|
bundles_for_gem(spec).each do |bundle|
- bad_paths = dylibs(bundle).select {|f| !File.exist?(f) }
+ bad_paths = dylibs(bundle).select do |f|
+ begin
+ Fiddle.dlopen(f)
+ false
+ rescue Fiddle::DLError
+ true
+ end
+ end
if bad_paths.any?
broken_links[spec] ||= []
broken_links[spec].concat(bad_paths)