    # File lib/rubygems/dependency_installer.rb, line 43
      def initialize(options = {})
        options = DEFAULT_OPTIONS.merge options

        @bin_dir = options[:bin_dir]
        @development = options[:development]
        @domain = options[:domain]
        @env_shebang = options[:env_shebang]
        @force = options[:force]
        @format_executable = options[:format_executable]
        @ignore_dependencies = options[:ignore_dependencies]
        @security_policy = options[:security_policy]
        @wrappers = options[:wrappers]

        @installed_gems = []

        @install_dir = options[:install_dir] || Gem.dir
        @cache_dir = options[:cache_dir] || @install_dir

        if options[:install_dir] then
          spec_dir = File.join @install_dir, 'specifications'
          @source_index = Gem::SourceIndex.from_gems_in spec_dir
        else
          @source_index = Gem.source_index
        end
      end