{"record":{"id":"f824e8514abebb0b","repo":"can1357/oh-my-pi","slug":"displayname-executable-not-found-on-path","errorCode":null,"errorMessage":"${displayName} executable not found on PATH","messagePattern":"(.+?) executable not found on PATH","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/eval/runtime-env.ts","lineNumber":101,"sourceCode":"\t}\n\tconst systemPath = $which(binaryName);\n\treturn systemPath ? [createRuntime(systemPath, baseEnv)] : [];\n}\n\n/**\n * Resolves the highest-priority runtime. Throws when none exists.\n */\nexport function resolveRuntime<T>(\n\tcwd: string,\n\tbaseEnv: Record<string, string | undefined>,\n\tbinaryName: string,\n\tcreateRuntime: (executablePath: string, env: Record<string, string | undefined>) => T,\n\tinterpreter?: string,\n): T {\n\tconst [runtime] = enumerateRuntimes(cwd, baseEnv, binaryName, createRuntime, interpreter);\n\tif (!runtime) {\n\t\tconst displayName = binaryName.charAt(0).toUpperCase() + binaryName.slice(1);\n\t\tthrow new Error(`${displayName} executable not found on PATH`);\n\t}\n\treturn runtime;\n}\n","sourceCodeStart":83,"sourceCodeEnd":105,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/coding-agent/src/eval/runtime-env.ts#L83-L105","documentation":"`resolveRuntime` in runtime-env.ts locates a language interpreter (binaryName, e.g. \"ruby\" or \"julia\" or a configured interpreter path) to host eval runtimes. If no explicit interpreter is configured and `$which(binaryName)` cannot find the executable on PATH, it throws `Error(\"<Name> executable not found on PATH\")` with the capitalized binary name.","triggerScenarios":"Starting a Ruby/Julia eval cell when the interpreter binary is not installed or not on PATH; a configured `interpreter` setting resolving to a nonexistent absolute path is also surfaced through this same throw path only when enumeration returns no runtime; running inside an env whose PATH lacks the toolchain (IDE launched from Finder, CI container, nvm/asdf shim not initialized).","commonSituations":"Fresh machine without ruby/julia installed; version manager (rbenv, asdf, juliaup) not on PATH in the process environment; Docker image missing the runtime; typo in configured interpreter path handled upstream but binary fallback missing here.","solutions":["Install the interpreter (e.g. `apt install ruby` / `brew install ruby` / `juliaup`) and reopen the terminal so PATH updates.","Verify availability with `which ruby` (or `which julia`); if missing, add the version-manager shim dir to PATH.","Configure the eval runtime's `interpreter` option to an explicit absolute path to the executable.","In CI, add a setup step (ruby/setup-ruby, julia-actions/setup-julia) before running evals."],"exampleFix":"// before\n// throws: Ruby executable not found on PATH\n// after\n// option: { interpreter: \"/Users/me/.rbenv/shims/ruby\" }  — or install ruby and ensure PATH includes it\nconst runtime = resolveRuntime(cwd, env, \"ruby\", createRuntime);","handlingStrategy":"validation","validationCode":"import { $which } from \"@oh-my-pi/pi-utils\";\nif (!interpreter && !(await $which(binaryName))) {\n  throw new Error(`${binaryName} is not installed or not on PATH — install it or set the interpreter option`);\n}\nconst runtime = resolveRuntime(cwd, env, binaryName, createRuntime, interpreter);","typeGuard":null,"tryCatchPattern":"let runtime: EvalRuntime;\ntry {\n  runtime = resolveRuntime(cwd, env, \"ruby\", createRubyRuntime);\n} catch (err) {\n  if (err instanceof Error && err.message.endsWith(\"not found on PATH\")) {\n    // surface install instructions or disable the eval language\n    throw new SkipEvalError(err.message);\n  }\n  throw err;\n}","preventionTips":["Check `which <binary>` in the deployment image / CI before enabling that language's eval cells.","Configure an explicit absolute `interpreter` path in environments with nonstandard toolchains.","Ensure version-manager shim dirs (rbenv, asdf, juliaup) are on PATH for the process that launches omp.","Add interpreter installation to setup scripts/Dockerfiles so PATH resolution always succeeds."],"tags":["typescript","path","environment","runtime-resolution","missing-binary"],"backgroundTag":"command-not-found","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}