{"record":{"id":"8eb4048d4d780458","repo":"ruby/rubygems","slug":"can-t-standalone-without-an-explicit-path-set","errorCode":null,"errorMessage":"Can't standalone without an explicit path set","messagePattern":"Can't standalone without an explicit path set","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"lib/bundler/installer.rb","lineNumber":168,"sourceCode":"        case exists.size\n        when 1\n          Bundler.ui.warn \"Skipped #{exists[0]} since it already exists.\"\n        when 2\n          Bundler.ui.warn \"Skipped #{exists.join(\" and \")} since they already exist.\"\n        else\n          items = exists[0...-1].empty? ? nil : exists[0...-1].join(\", \")\n          skipped = [items, exists[-1]].compact.join(\" and \")\n          Bundler.ui.warn \"Skipped #{skipped} since they already exist.\"\n        end\n        Bundler.ui.warn \"If you want to overwrite skipped stubs, use --force.\"\n      end\n    end\n\n    def generate_standalone_bundler_executable_stubs(spec, options = {})\n      # double-assignment to avoid warnings about variables that will be used by ERB\n      bin_path = Bundler.bin_path\n      unless path = Bundler.settings[:path]\n        raise \"Can't standalone without an explicit path set\"\n      end\n      standalone_path = Bundler.root.join(path).relative_path_from(bin_path)\n      standalone_path = standalone_path\n      template = File.read(File.expand_path(\"templates/Executable.standalone\", __dir__))\n      ruby_command = Thor::Util.ruby_command\n      ruby_command = ruby_command\n\n      spec.executables.each do |executable|\n        next if executable == \"bundle\"\n        executable_path = Pathname(spec.full_gem_path).join(spec.bindir, executable).relative_path_from(bin_path)\n        executable_path = executable_path\n\n        mode = Gem.win_platform? ? \"wb:UTF-8\" : \"w\"\n        require \"erb\"\n        content = ERB.new(template, trim_mode: \"-\").result(binding)\n\n        File.write(\"#{bin_path}/#{executable}\", content, mode: mode, perm: 0o755)\n        if Gem.win_platform? || options[:all_platforms]","sourceCodeStart":150,"sourceCodeEnd":186,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/bundler/installer.rb#L150-L186","documentation":"Error \"Can't standalone without an explicit path set\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/bundler/installer.rb:168 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set an explicit install path first: `bundle config set --local path vendor/bundle`"],"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"}