ruby/rubygems · error · InvalidOption

--normalize-platforms can't be used with --remove-platform

Error message

--normalize-platforms can't be used with --remove-platform

What it means

Error "--normalize-platforms can't be used with --remove-platform" thrown in ruby/rubygems.

Source

Thrown at lib/bundler/cli/lock.rb:98

          puts "Writing lockfile to #{file}"
          definition.write_lock(file, false)
        end

        Bundler::CLI::Common.output_cooldown_skipped_summary(definition)
      end

      Bundler.ui.output_stream = previous_output_stream
    end

    private

    def check_for_conflicting_options
      if options["normalize-platforms"] && options["add-platform"].any?
        raise InvalidOption, "--normalize-platforms can't be used with --add-platform"
      end

      if options["normalize-platforms"] && options["remove-platform"].any?
        raise InvalidOption, "--normalize-platforms can't be used with --remove-platform"
      end
    end
  end
end

View on GitHub (pinned to 86cbb817a3)

When it happens

Trigger: Thrown at lib/bundler/cli/lock.rb:98 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/45688039a8e1e097. Report an issue: GitHub.