{"record":{"id":"4f53de8cf05b30c5","repo":"windmill-labs/windmill","slug":"result-substring-err-prefix-length","errorCode":null,"errorMessage":"result.substring(__ERR_PREFIX.length)","messagePattern":"result\\.substring\\(__ERR_PREFIX\\.length\\)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"backend/windmill-jseval/src/lib.rs","lineNumber":622,"sourceCode":"                    .get_resource_value_interpolated::<serde_json::Value>(&path, None)\n                    .await\n                {\n                    Ok(value) => {\n                        serde_json::to_string(&value).unwrap_or_else(|_| \"null\".to_string())\n                    }\n                    Err(e) => format!(\"{}{}\", ERR_PREFIX, e),\n                }\n            }\n        }))),\n    )?;\n\n    let wrapper_code = r#\"\n        const __ERR_PREFIX = '\\x00__WINDMILL_ERR__\\x00';\n\n        async function variable(path) {\n            const result = await __fetchVariable(path);\n            if (typeof result === 'string' && result.startsWith(__ERR_PREFIX)) {\n                throw new Error(result.substring(__ERR_PREFIX.length));\n            }\n            return result;\n        }\n\n        async function resource(path) {\n            const result = await __fetchResource(path);\n            if (typeof result === 'string' && result.startsWith(__ERR_PREFIX)) {\n                throw new Error(result.substring(__ERR_PREFIX.length));\n            }\n            return JSON.parse(result);\n        }\n    \"#;\n\n    ctx.eval::<(), _>(wrapper_code)\n        .catch(ctx)\n        .map_err(quickjs_error_to_anyhow)?;\n\n    Ok(())","sourceCodeStart":604,"sourceCodeEnd":640,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/backend/windmill-jseval/src/lib.rs#L604-L640","documentation":"Ruby dependencies whose resolved source is a GIT repository are rejected. Windmill's ruby proxy only supports GEM-type remotes, so a dependency spec pointing at git (gem 'x', git: '...') throws this error during install.","triggerScenarios":"A Gemfile declares a gem with a git: source (or :github:) and the lockfile resolves FinalSource::GIT; also when a gem's source URL scheme parses to a git remote.","commonSituations":"Copying Gemfiles that use git-sourced gems or unreleased branches; depending on a fork only available on GitHub; enterprise setups where internal gems live in git repos.","solutions":["Publish the gem to a gem server (internal Gemfury/Artifactory/Gem in a Box) and depend on it as a normal gem source","Configure that gem server in Windmill instance settings and reference it via a plain source URL","Use a released version of the gem from rubygems.org instead of the git checkout","If the fix is only on a branch, vendor the change into a locally published gem version"],"exampleFix":"// before\ngem 'my_gem', git: 'https://github.com/acme/my_gem.git'\n// after\ngem 'my_gem', '1.2.3', source: 'https://gems.example.com'","handlingStrategy":"validation","validationCode":"function validateNoGitSources(gemfile) {\n  if (/^\\s*gem\\s+['\"][^'\"]+['\"],?\\s*(git:|github:)/m.test(gemfile)) {\n    throw new Error('git-sourced gems are not supported; publish to a gem server and reference it');\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  await runRubyJob(gemfile);\n} catch (e) {\n  if (/GIT is not supported/.test(e.message)) {\n    throw new Error('Replace git: gem sources with a published gem version from a supported gem server');\n  }\n  throw e;\n}","preventionTips":["Publish internal gems to a gem server registered in instance settings","Avoid git:/github: sources in Windmill ruby Gemfiles","Vendor branch-only fixes into a released gem version"],"tags":["ruby","bundler","git-dependency","unsupported-feature"],"backgroundTag":"git-source-unsupported","analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}