class Bundler::Installer

def run(options)

information.
require paths and save them in a `setup.rb` file. See `bundle standalone --help` for more
Finally, if the user has specified the standalone flag, Bundler will generate the needed

that a user runs `bundle install` they will receive any updates from this process.
Sixthly, a new Gemfile.lock is created from the installed gems to ensure that the next time

earlier.
but only if the --binstubs option has been passed or Bundler.options[:bin] has been set
This then leads into the gems being installed, along with stubs for their executables,
Fifthly, Bundler resolves the dependencies either through a cache of gems or by remote.

that are not in the Gemfile.lock and resolve any dependencies if needed.
During this step Bundler will also download information about any new gems
then proceeds to set up a definition based on the Gemfile and the Gemfile.lock.
Fourthly, Bundler checks if the Gemfile.lock exists, and if so

so and this method returns.
If there are no dependencies specified then Bundler returns a warning message stating
Thirdly, Bundler checks if there are any dependencies specified in the Gemfile.

`bundle install` will potentially not install the correct gems.
If this file is not correctly updated then any other developer running
`bundle install`, which leads to the Gemfile.lock file not being correctly updated.
This stops a situation where a developer may update the Gemfile but may not run
Frozen ensures that the Gemfile and the Gemfile.lock file are matching.
Secondly, it checks if Bundler has been configured to be "frozen".

unless other specified.
location as RubyGems which typically is the `~/.gem` directory
and if not then Bundler will create the directory. This is usually the same
Firstly, this method will check to see if `Bundler.bundle_path` exists

Runs the install procedures for a specific Gemfile.
def run(options)
  Bundler.create_bundle_path
  ProcessLock.lock do
    if Bundler.frozen_bundle?
      @definition.ensure_equivalent_gemfile_and_lockfile(options[:deployment])
    end
    if @definition.dependencies.empty?
      Bundler.ui.warn "The Gemfile specifies no dependencies"
      lock
      return
    end
    if resolve_if_needed(options)
      ensure_specs_are_compatible!
      load_plugins
      options.delete(:jobs)
    else
      options[:jobs] = 1 # to avoid the overhead of Bundler::Worker
    end
    install(options)
    Gem::Specification.reset # invalidate gem specification cache so that installed gems are immediately available
    lock unless Bundler.frozen_bundle?
    Standalone.new(options[:standalone], @definition).generate if options[:standalone]
  end
end