ruby/rubygems · error · Bundler::InvalidOption
The options #{scopes.join " and "} were specified. Please on
Error message
The options #{scopes.join " and "} were specified. Please only use one of the switches at a time. What it means
Error "The options #{scopes.join " and "} were specified. Please only use one of the switches at a time." thrown in ruby/rubygems.
Source
Thrown at lib/bundler/cli/config.rb:193
def warn_unused_scope(msg)
return unless explicit_scope?
return if options[:parseable]
Bundler.ui.warn(msg)
end
def validate_scope!
@explicit_scope = true
scopes = %w[global local].select {|s| options[s] }
case scopes.size
when 0
@scope = inside_app? ? "local" : "global"
@explicit_scope = false
when 1
@scope = scopes.first
else
raise InvalidOption,
"The options #{scopes.join " and "} were specified. Please only use one of the switches at a time."
end
end
private
def inside_app?
Bundler.root
true
rescue GemfileNotFound
false
end
end
end
end
View on GitHub (pinned to 86cbb817a3)
When it happens
Trigger: Thrown at lib/bundler/cli/config.rb:193 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/441297495f126dc6.
Report an issue: GitHub.