{"record":{"id":"289598e8ec5964b7","repo":"ruby/rubygems","slug":"the-path-flag-has-been-removed-because-its-sem","errorCode":null,"errorMessage":"The `--path` flag has been removed because its semantics were unclear. Use `bundle config cache_path` to configure the path of your cache of gems, and `bundle config path` to configure the path where your gems are installed, and stop using this flag","messagePattern":"The `--path` flag has been removed because its semantics were unclear\\. Use `bundle config cache_path` to configure the path of your cache of gems, and `bundle config path` to configure the path where your gems are installed, and stop using this flag","errorType":"validation","errorClass":"InvalidOption","httpStatus":null,"severity":"error","filePath":"lib/bundler/cli.rb","lineNumber":486,"sourceCode":"      directory ./vendor/cache. If you then check that directory into your source\n      control repository, others who check out your source will be able to install the\n      bundle without having to download any additional gems.\n    D\n    def cache\n      print_remembered_flag_deprecation(\"--all\", \"cache_all\", \"true\") if ARGV.include?(\"--all\")\n      print_remembered_flag_deprecation(\"--no-all\", \"cache_all\", \"false\") if ARGV.include?(\"--no-all\")\n\n      %w[frozen no-prune].each do |option|\n        remembered_flag_deprecation(option)\n      end\n\n      if flag_passed?(\"--path\")\n        removed_message =\n          \"The `--path` flag has been removed because its semantics were unclear. \" \\\n          \"Use `bundle config cache_path` to configure the path of your cache of gems, \" \\\n          \"and `bundle config path` to configure the path where your gems are installed, \" \\\n          \"and stop using this flag\"\n        raise InvalidOption, removed_message\n      end\n\n      require_relative \"cli/cache\"\n      Cache.new(options).run\n    end\n\n    map aliases_for(\"cache\")\n\n    desc \"exec [OPTIONS]\", \"Run the command in context of the bundle\"\n    method_option :keep_file_descriptors, type: :boolean, default: true, banner: \"Passes all file descriptors to the new processes. Default is true, and setting it to false is not permitted (removed).\"\n    method_option :gemfile, type: :string, required: false, banner: \"Use the specified gemfile instead of Gemfile\"\n    long_desc <<-D\n      Exec runs a command, providing it access to the gems in the bundle. While using\n      bundle exec you can require and call the bundled gems as if they were installed\n      into the system wide RubyGems repository.\n    D\n    def exec(*args)\n      if ARGV.include?(\"--no-keep-file-descriptors\")","sourceCodeStart":468,"sourceCodeEnd":504,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/bundler/cli.rb#L468-L504","documentation":"Error \"The `--path` flag has been removed because its semantics were unclear. Use `bundle config cache_path` to configure the path of your cache of gems, and `bundle config path` to configure the path where your gems are installed, and stop using this flag\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/bundler/cli.rb:486 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"}