lib/autoproj/package_managers/bundler_manager.rb in autoproj-2.0.0.rc8 vs lib/autoproj/package_managers/bundler_manager.rb in autoproj-2.0.0.rc9

- old
+ new

@@ -1,5 +1,6 @@ +require 'bundler' module Autoproj module PackageManagers # Package manager interface for the RubyGems system class BundlerManager < Manager class << self @@ -30,11 +31,11 @@ env.inherit 'GEM_PATH' env.init_from_env 'GEM_PATH' env.system_env['GEM_PATH'] = Gem.default_path - if env.original_env['GEM_HOME'].empty? + if (env.original_env['GEM_HOME'] || '').empty? env.unset('GEM_HOME') end env.init_from_env 'RUBYLIB' env.inherit 'RUBYLIB' @@ -198,10 +199,11 @@ FileUtils.rm_f File.join(binstubs_path, 'bundler') backup_clean(backups) end def discover_rubylib + require 'bundler' Tempfile.open 'autoproj-rubylib' do |io| result = Bundler.clean_system( Hash['RUBYLIB' => nil], Autobuild.tool('ruby'), '-e', 'puts $LOAD_PATH', out: io, @@ -211,9 +213,10 @@ end end end def discover_bundle_rubylib + require 'bundler' gemfile = File.join(ws.prefix_dir, 'gems', 'Gemfile') Tempfile.open 'autoproj-rubylib' do |io| result = Bundler.clean_system( Hash['BUNDLE_GEMFILE' => gemfile], Autobuild.tool('bundler'), 'exec', 'ruby', '-e', 'puts $LOAD_PATH',