method
setup
Ruby latest stable (v2_5_5)
-
0 notes -
Class: Runtime
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3 (0)
- What's this?
setup(*groups)
public
Hide source
# File lib/bundler/runtime.rb, line 12 def setup(*groups) @definition.ensure_equivalent_gemfile_and_lockfile if Bundler.frozen_bundle? groups.map!(&:to_sym) # Has to happen first clean_load_path specs = groups.any? ? @definition.specs_for(groups) : requested_specs SharedHelpers.set_bundle_environment Bundler.rubygems.replace_entrypoints(specs) # Activate the specs load_paths = specs.map do |spec| unless spec.loaded_from raise GemNotFound, "#{spec.full_name} is missing. Run `bundle install` to get it." end check_for_activated_spec!(spec) Bundler.rubygems.mark_loaded(spec) spec.load_paths.reject {|path| $LOAD_PATH.include?(path) } end.reverse.flatten # See Gem::Specification#add_self_to_load_path (since RubyGems 1.8) if insert_index = Bundler.rubygems.load_path_insert_index # Gem directories must come after -I and ENV['RUBYLIB'] $LOAD_PATH.insert(insert_index, *load_paths) else # We are probably testing in core, -I and RUBYLIB don't apply $LOAD_PATH.unshift(*load_paths) end setup_manpath lock(:preserve_unknown_sections => true) self end