diff --git a/lib/logstash/pluginmanager/command.rb b/lib/logstash/pluginmanager/command.rb index 2a2c7508c87..692a126ab4b 100644 --- a/lib/logstash/pluginmanager/command.rb +++ b/lib/logstash/pluginmanager/command.rb @@ -32,6 +32,7 @@ def remove_unused_locally_installed_gems! end def relative_path(path) - Pathname.new(path).relative_path_from(Pathname.new(LogStash::Environment::LOGSTASH_HOME)).to_s + require "pathname" + ::Pathname.new(path).relative_path_from(::Pathname.new(LogStash::Environment::LOGSTASH_HOME)).to_s end end