{"record":{"id":"441297495f126dc6","repo":"ruby/rubygems","slug":"the-options-scopes-join-and-were-specified","errorCode":null,"errorMessage":"The options #{scopes.join \" and \"} were specified. Please only use one of the switches at a time.","messagePattern":"The options #(.+?) were specified\\. Please only use one of the switches at a time\\.","errorType":"exception","errorClass":"Bundler::InvalidOption","httpStatus":null,"severity":"error","filePath":"lib/bundler/cli/config.rb","lineNumber":193,"sourceCode":"\n      def warn_unused_scope(msg)\n        return unless explicit_scope?\n        return if options[:parseable]\n\n        Bundler.ui.warn(msg)\n      end\n\n      def validate_scope!\n        @explicit_scope = true\n        scopes = %w[global local].select {|s| options[s] }\n        case scopes.size\n        when 0\n          @scope = inside_app? ? \"local\" : \"global\"\n          @explicit_scope = false\n        when 1\n          @scope = scopes.first\n        else\n          raise InvalidOption,\n            \"The options #{scopes.join \" and \"} were specified. Please only use one of the switches at a time.\"\n        end\n      end\n\n      private\n\n      def inside_app?\n        Bundler.root\n        true\n      rescue GemfileNotFound\n        false\n      end\n    end\n  end\nend\n","sourceCodeStart":175,"sourceCodeEnd":209,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/bundler/cli/config.rb#L175-L209","documentation":"Error \"The options #{scopes.join \" and \"} were specified. Please only use one of the switches at a time.\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/bundler/cli/config.rb:193 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"86cbb817a38ce8477b181c17467a703ded3f2be8","analyzedAt":"2026-08-23T06:27:48.159Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}