{"record":{"id":"87fd6f5f5a8ecff8","repo":"ruby/ruby","slug":"13","errorCode":"13","errorMessage":"Your bundle path contains text matching #{path_separator.inspect}, which is the path separator for your system. Bundler cannot function correctly when the Bundle path contains the system's PATH separator. Please change your bundle path to not match #{path_separator.inspect}.\nYour current bundle path is '#{Bundler.bundle_path}'.","messagePattern":"Your bundle path contains text matching #(.+?), which is the path separator for your system\\. Bundler cannot function correctly when the Bundle path contains the system's PATH separator\\. Please change your bundle path to not match #(.+?)\\.\nYour current bundle path is '#(.+?)'\\.","errorType":"exception","errorClass":"Bundler::PathError","httpStatus":null,"severity":"error","filePath":"lib/bundler/shared_helpers.rb","lineNumber":246,"sourceCode":"    def relative_path_to(destination, from: pwd)\n      Pathname.new(destination).relative_path_from(from).to_s\n    rescue ArgumentError\n      # on Windows, if source and destination are on different drivers, there's no relative path from one to the other\n      destination\n    end\n\n    private\n\n    def validate_bundle_path\n      path_separator = Bundler.rubygems.path_separator\n      return unless Bundler.bundle_path.to_s.split(path_separator).size > 1\n      message = \"Your bundle path contains text matching #{path_separator.inspect}, \" \\\n                \"which is the path separator for your system. Bundler cannot \" \\\n                \"function correctly when the Bundle path contains the \" \\\n                \"system's PATH separator. Please change your \" \\\n                \"bundle path to not match #{path_separator.inspect}.\" \\\n                \"\\nYour current bundle path is '#{Bundler.bundle_path}'.\"\n      raise Bundler::PathError, message\n    end\n\n    def find_gemfile\n      given = ENV[\"BUNDLE_GEMFILE\"]\n      return given if given && !given.empty?\n      find_file(*gemfile_names)\n    end\n\n    def gemfile_names\n      [\"gems.rb\", \"Gemfile\"]\n    end\n\n    def find_file(*names)\n      search_up(*names) do |filename|\n        return filename if File.file?(filename)\n      end\n    end\n","sourceCodeStart":228,"sourceCodeEnd":264,"githubUrl":"https://github.com/ruby/ruby/blob/0e5b888e1c355f3f728f2659f085820937dada48/lib/bundler/shared_helpers.rb#L228-L264","documentation":"SharedHelpers#validate_bundle_path guards the configured bundle path: if Bundler.bundle_path.to_s splits on Gem.path_separator (the OS list separator, e.g. ':' on Unix, ';' on Windows) into more than one segment, Bundler::PathError is raised. A bundle path containing the separator would be ambiguous everywhere Bundler and RubyGems split path lists, so Bundler refuses to operate and echoes the current path.","triggerScenarios":"BUNDLE_PATH assembled by string-joining several directories with File::PATH_SEPARATOR; copy-pasted Windows config embedding ';' inside the value; CI templates that accidentally append $PATH or $GEM_PATH into BUNDLE_PATH via naive interpolation.","commonSituations":"Docker/CI variable templating bugs that concatenate lists; values pasted from documentation examples of GEM_PATH (which IS a list) into BUNDLE_PATH (which is a single directory); misconfigured deployment tooling.","solutions":["Set BUNDLE_PATH (or `bundle config set path`) to a single directory with no separator characters, e.g. vendor/bundle","Fix the CI/CD template or script that builds the variable from a joined list","Temporarily `bundle config unset path` to fall back to the default install location and confirm everything else works"],"exampleFix":"# before\n$ BUNDLE_PATH=\"C:/gems;D:/gems\" bundle install\n# Your bundle path contains text matching \";\" ...\n\n# after\n$ BUNDLE_PATH=\"C:/gems\" bundle install","handlingStrategy":"validation","validationCode":"def safe_bundle_path?(path)\n  s = path.to_s\n  !s.empty? && s.count(Gem.path_separator).zero?\nend","typeGuard":null,"tryCatchPattern":"begin\n  Bundler.ui = ... # any early bundler setup that validates settings\n  # e.g. Bundler.configure if exposing internals in a wrapper tool\nrescue Bundler::PathError => e\n  abort \"fix BUNDLE_PATH (contains #{Gem.path_separator.inspect}): #{e.message}\"\nend","preventionTips":["Never build BUNDLE_PATH by joining a list — it is one directory","Template CI variables with a single literal path","Smoke-test images with `bundle env` before shipping"],"tags":["bundler","path","configuration","environment"],"backgroundTag":"invalid-install-path","analyzedSha":"0e5b888e1c355f3f728f2659f085820937dada48","analyzedAt":"2026-08-21T14:25:43.473Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}