gollum/gollum · info
Not found.
Error message
Not found.
What it means
not_found_proc builds a bare Rack 404 response - body 'Not found.', Content-Type text/html, explicit Content-Length - and is used as the fallback app handed to Rack::Static for the MathJax mount (app.rb line 176) and the static assets mount (line 183). When a requested file is not on disk under those roots, this proc answers; there is no gollum error page and no logging.
Source
Thrown at lib/gollum/helpers.rb:62
def clean_url(url)
return url if url.nil?
url.gsub('%2F', '/').gsub(%r{/{2,}}, '/').gsub(%r{^/}, '')
end
def forbid(msg = "Forbidden. This wiki is set to no-edit mode.")
@message = msg
status 403
halt mustache :error
end
def not_found(msg = nil)
@message = msg || "The requested page does not exist."
status 404
return mustache :error
end
def not_found_proc
not_found_msg = 'Not found.'
Proc.new {[404, {'Content-Type' => 'text/html', 'Content-Length' => not_found_msg.length.to_s}, [not_found_msg]]}
end
def emoji(name)
if emoji = Gemojione.index.find_by_name(name)
IO.read(EMOJI_PATHNAME.join("#{emoji['unicode'].downcase}.png"))
else
fail ArgumentError, "emoji `#{name}' not found"
end
end
end
end
View on GitHub (pinned to d00fefc89b)
Solutions
- Configure MathJax properly (gollum --mathjax / wiki_options) and verify the directory actually contains the requested files
- Fix or remove broken asset URLs in your templates
- Expect the plain 'Not found.' body (not HTML) from these paths when debugging
Defensive patterns
Strategy: validation
Validate before calling
asset = File.join(static_root, env['PATH_INFO'].to_s) File.file?(asset) ? File.read(asset) : nil # serve only when the file exists; otherwise expect the bare 'Not found.' 404
Prevention
- Verify the MathJax/static asset directories exist on disk after installs and upgrades
- Don't rely on HTML error pages under /mathjax or asset paths - the fallback is a plain-text 404
When it happens
Trigger: Requesting /mathjax/... paths when the MathJax option/path is unconfigured or its directory is incomplete; requesting any static asset filename that does not exist on disk.
Common situations: Package installs where MathJax assets are not bundled or the :mathjax option points at a partial directory; proxies and scanners probing asset paths; upgraded gollum versions with moved assets.
Related errors
- Invalid commit: #{@version}
- The requested page does not exist.
- The requested page does not exist.
- Changing this resource is not allowed.
- The file you are trying to upload already exists.
AI-assisted analysis of gollum/gollum@d00fefc89b (2026-08-21).
Data as JSON: /api/errors/aa8e27def1961ea7.
Report an issue: GitHub.