deivid-rodriguez/byebug · error · Byebug::Printers::Base::MissedArgument
Missed argument #{key} for '#{string}'
Error message
Missed argument #{key} for '#{string}' What it means
Error "Missed argument #{key} for '#{string}'" thrown in deivid-rodriguez/byebug.
Source
Thrown at lib/byebug/printers/base.rb:39
def locate(path)
result = nil
contents.each_value do |contents|
result = parts(path).reduce(contents) do |r, part|
r&.key?(part) ? r[part] : nil
end
break if result
end
raise MissedPath, "Can't find part path '#{path}'" unless result
result
end
def translate(string, args = {})
# they may contain #{} string interpolation
string.gsub(/\|\w+$/, "").gsub(/([^#]?){([^}]*)}/) do
key = Regexp.last_match[2].to_s
raise MissedArgument, "Missed argument #{key} for '#{string}'" unless args.key?(key.to_sym)
"#{Regexp.last_match[1]}#{args[key.to_sym]}"
end
end
def parts(path)
path.split(SEPARATOR)
end
def contents
@contents ||= contents_files.each_with_object({}) do |filename, hash|
hash[filename] = YAML.load_file(filename) || {}
end
end
def array_of_args(collection, &_block)
collection_with_index = collection.each.with_index
collection_with_index.each_with_object([]) do |(item, index), array|View on GitHub (pinned to 25476b18d9)
Solutions
- Pass every {placeholder} used in the template string as a symbol key in the args hash to translate/print.
- Fix the template to remove or rename placeholders that have no matching argument.
Example fix
translate('Line {line}', { line: 5 }) # provide :line so {line} can be substituted When it happens
Trigger: Thrown at lib/byebug/printers/base.rb:39 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of deivid-rodriguez/byebug@25476b18d9 (2026-08-23).
Data as JSON: /api/errors/037a318ab2ad06c7.
Report an issue: GitHub.