ruby/rubygems · error · RuntimeError
Can't standalone without an explicit path set
Error message
Can't standalone without an explicit path set
What it means
Error "Can't standalone without an explicit path set" thrown in ruby/rubygems.
Source
Thrown at lib/bundler/installer.rb:168
case exists.size
when 1
Bundler.ui.warn "Skipped #{exists[0]} since it already exists."
when 2
Bundler.ui.warn "Skipped #{exists.join(" and ")} since they already exist."
else
items = exists[0...-1].empty? ? nil : exists[0...-1].join(", ")
skipped = [items, exists[-1]].compact.join(" and ")
Bundler.ui.warn "Skipped #{skipped} since they already exist."
end
Bundler.ui.warn "If you want to overwrite skipped stubs, use --force."
end
end
def generate_standalone_bundler_executable_stubs(spec, options = {})
# double-assignment to avoid warnings about variables that will be used by ERB
bin_path = Bundler.bin_path
unless path = Bundler.settings[:path]
raise "Can't standalone without an explicit path set"
end
standalone_path = Bundler.root.join(path).relative_path_from(bin_path)
standalone_path = standalone_path
template = File.read(File.expand_path("templates/Executable.standalone", __dir__))
ruby_command = Thor::Util.ruby_command
ruby_command = ruby_command
spec.executables.each do |executable|
next if executable == "bundle"
executable_path = Pathname(spec.full_gem_path).join(spec.bindir, executable).relative_path_from(bin_path)
executable_path = executable_path
mode = Gem.win_platform? ? "wb:UTF-8" : "w"
require "erb"
content = ERB.new(template, trim_mode: "-").result(binding)
File.write("#{bin_path}/#{executable}", content, mode: mode, perm: 0o755)
if Gem.win_platform? || options[:all_platforms]View on GitHub (pinned to 86cbb817a3)
Solutions
- Set an explicit install path first: `bundle config set --local path vendor/bundle`
When it happens
Trigger: Thrown at lib/bundler/installer.rb:168 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/8eb4048d4d780458.
Report an issue: GitHub.