diff --git a/Library/Homebrew/standalone/init.rb b/Library/Homebrew/standalone/init.rb index 9f9c7831fb9681..8a3ff9b696346b 100644 --- a/Library/Homebrew/standalone/init.rb +++ b/Library/Homebrew/standalone/init.rb @@ -42,7 +42,9 @@ if Pathname.new(RbConfig.ruby).to_s.include?("/vendor/portable-ruby/") prefix = RbConfig::CONFIG["rubylibprefix"] ruby_version = RbConfig::CONFIG["ruby_version"] - $LOAD_PATH.unshift "#{prefix}/gems/#{ruby_version}/gems/debug-1.6.3/lib" + ruby_path = Pathname.new("#{prefix}/gems/#{ruby_version}") + $LOAD_PATH.unshift "#{ruby_path}/gems/debug-1.6.3/lib" + $LOAD_PATH.unshift "#{ruby_path}/extensions/#{Gem::Platform.local}/#{ruby_version}-static/debug-1.6.3" end unless $LOAD_PATH.include?(HOMEBREW_LIBRARY_PATH.to_s)