ruby/rubygems · error · InvalidOption

No plugin sources available for #{options["type"]}

Error message

No plugin sources available for #{options["type"]}

What it means

Error "No plugin sources available for #{options["type"]}" thrown in ruby/rubygems.

Source

Thrown at lib/bundler/dsl.rb:128

    end

    def lockfile(file)
      @lockfile = file
    end

    def source(source, *args, &blk)
      options = args.last.is_a?(Hash) ? args.pop.dup : {}
      options = normalize_hash(options)
      source = normalize_source(source)
      cooldown = options["cooldown"]
      if cooldown && !(cooldown.is_a?(Integer) && cooldown >= 0)
        raise InvalidOption, "Expected `cooldown` to be a non-negative integer, got #{cooldown.inspect}"
      end

      if options.key?("type")
        options["type"] = options["type"].to_s
        unless (source_plugin = Plugin.source_plugin(options["type"]))
          raise InvalidOption, "No plugin sources available for #{options["type"]}"
        end
        # Implicitly add a dependency on source plugins who are named bundler-source-<type>,
        # and aren't already mentioned in the Gemfile.
        # See also Plugin::DSL#source
        if source_plugin.start_with?("bundler-source-") && !@dependencies.any? {|d| d.name == source_plugin }
          plugin(source_plugin)
        end

        unless block_given?
          raise InvalidOption, "You need to pass a block to #source with :type option"
        end

        source_opts = options.merge("uri" => source)
        with_source(@sources.add_plugin_source(options["type"], source_opts), &blk)
      elsif block_given?
        with_source(@sources.add_rubygems_source("remotes" => source, "cooldown" => cooldown), &blk)
      else
        @sources.add_global_rubygems_remote(source, cooldown: cooldown)

View on GitHub (pinned to 86cbb817a3)

When it happens

Trigger: Thrown at lib/bundler/dsl.rb:128 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ruby/rubygems@86cbb817a3 (2026-08-23). Data as JSON: /api/errors/93b3177c93778d54. Report an issue: GitHub.