diff --git a/lib/logstash/environment.rb b/lib/logstash/environment.rb index 6daf13aea..0711abc9f 100644 --- a/lib/logstash/environment.rb +++ b/lib/logstash/environment.rb @@ -56,13 +56,14 @@ module LogStash # the bootstrap gems are required specificly for bundler which is a runtime dependency # of some plugins dependedant gems. def set_gem_paths! - ENV["GEM_HOME"] = ENV["GEM_PATH"] = logstash_gem_home + ENV["GEM_PATH"] = ENV["BUNDLE_PATH"] = logstash_gem_home ENV["BUNDLE_GEMFILE"] = GEMFILE_PATH unless ENV['BUNDLE_GEMFILE'] require 'bundler' require 'logstash/bundler_patch' Bundler.setup + ENV["GEM_HOME"] = ENV["GEM_PATH"] = logstash_gem_home # Bundler.setup will wipe the existing $LOAD_PATH. # Since we are using gems not declared in the gemfile we need to