require "infisical"client = Infisical::Client.new# Authenticate with a machine identityclient.auth.universal_auth_login( client_id: ENV.fetch("INFISICAL_CLIENT_ID"), client_secret: ENV.fetch("INFISICAL_CLIENT_SECRET"))# Fetch a secret by namesecret = client.secrets.get( "API_KEY", project_id: "YOUR_PROJECT_ID", environment: "dev")puts secret.secret_value
This example demonstrates how to use the Infisical Ruby SDK in a simple Ruby application. The application retrieves a secret named API_KEY from the dev environment of the YOUR_PROJECT_ID project.
We don’t recommend hardcoding your Machine Identity
Tokens. Setting it as
an environment variable would be best.
Installation
The SDK requires Ruby 3.0.0 or higher.
gem install infisical-sdk
Or add it to your Gemfile:
gem "infisical-sdk"
Configuration
Require the SDK and create a client instance. The require path is "infisical".
The URL of the Infisical instance. Set this to your instance URL when self-hosting Infisical.
integer
default:"10"
The timeout, in seconds, for HTTP requests made by the SDK.
Authentication
The SDK authenticates as a machine identity. The most common authentication method is Universal Auth, which uses a client ID and client secret. If you already have a valid access token, you can also set it on the client directly.
Universal auth
Log in with a machine identity’s client ID and client secret. On success, the returned access token is stored on the client and used for all subsequent requests.
The name of the secret to create. Passed as the first positional argument.
string
required
The value of the secret. Passed as the second positional argument.
string
required
The ID of the project where the secret will be created.
string
required
The slug name (dev, prod, etc.) of the environment where the secret will be created.
string
default:"/"
The path where the secret should be created.
string
A comment to associate with the secret.
boolean
Whether or not to skip multiline encoding for the secret value.
Update secret
client.secrets.update(secret_name, options)Update an existing secret’s value, rename it, or both. You must provide at least one of secret_value or new_secret_name, otherwise an ArgumentError is raised. Returns the updated secret.
The name of the secret to update. Passed as the first positional argument.
string
required
The ID of the project where the secret lives.
string
required
The slug name (dev, prod, etc.) of the environment where the secret lives.
string
The new value of the secret. Required unless new_secret_name is provided.
string
A new name for the secret. Required unless secret_value is provided.
string
default:"/"
The path where the secret lives.
boolean
Whether or not to skip multiline encoding for the new secret value.
Delete secret
client.secrets.delete(secret_name, options)Delete a secret by name. Raises Infisical::NotFoundError if the secret doesn’t exist. Returns the deleted secret.
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Infisical","colors":{"primary":"#26272b","light":"#dbf530","dark":"#A1B659"},"logo":{"light":"https://mintlify.s3.us-west-1.amazonaws.com/infisical/logo/light.svg","dark":"https://mintlify.s3.us-west-1.amazonaws.com/infisical/logo/dark.svg","href":"/"},"favicon":"https://mintlify.s3.us-west-1.amazonaws.com/infisical/favicon.ico","api":{"openapi":"https://app.infisical.com/api/docs/json","mdx":{"server":["https://app.infisical.com"]}},"appearance":{"default":"light"},"background":{"color":{"light":"#ffffff","dark":"#08090b"}},"navbar":{"links":[{"href":"https://app.infisical.com/login","label":"Log In"}],"primary":{"type":"button","label":"Start for Free","href":"https://app.infisical.com/signup"}},"footer":{"socials":{"x":"https://www.twitter.com/infisical","linkedin":"https://www.linkedin.com/company/infisical","github":"https://github.com/Infisical/infisical-cli","website":"https://community.infisical.com"},"links":[{"header":"PRODUCT","items":[{"label":"Secrets Management","href":"https://infisical.com/platform/secrets-management"},{"label":"Certificate Management","href":"https://infisical.com/platform/certificate-management"},{"label":"Privileged Access Management (PAM)","href":"https://infisical.com/platform/pam"},{"label":"Agent Vault","href":"https://infisical.com/platform/agent-vault"},{"label":"Key Management Service (KMS)","href":"https://infisical.com/docs/documentation/platform/kms/overview"},{"label":"Secret Scanning","href":"https://infisical.com/radar"},{"label":"Share Secrets","href":"https://app.infisical.com/share-secret"},{"label":"Pricing","href":"https://infisical.com/pricing"},{"label":"Security","href":"https://infisical.com/docs/internals/security"},{"label":"Blog","href":"https://infisical.com/blog"},{"label":"Infisical vs Vault","href":"https://infisical.com/infisical-vs-hashicorp-vault"},{"label":"Community","href":"https://community.infisical.com/"}]},{"header":"USE CASES","items":[{"label":"Infisical Agent","href":"https://infisical.com/docs/documentation/getting-started/introduction"},{"label":"Infisical Proxy","href":"https://infisical.com/docs/integrations/platforms/infisical-proxy"},{"label":"Kubernetes","href":"https://infisical.com/docs/integrations/platforms/kubernetes"},{"label":"Dynamic Secrets","href":"https://infisical.com/docs/documentation/platform/dynamic-secrets/overview"},{"label":"Terraform","href":"https://registry.terraform.io/providers/Infisical/infisical/latest/docs"},{"label":"Ansible","href":"https://infisical.com/docs/integrations/platforms/ansible"},{"label":"Jenkins","href":"https://infisical.com/docs/integrations/cicd/jenkins"},{"label":"Docker","href":"https://infisical.com/docs/integrations/platforms/docker"},{"label":"AWS ECS","href":"https://infisical.com/docs/integrations/platforms/ecs-with-agent"},{"label":"GitLab","href":"https://infisical.com/docs/integrations/cicd/gitlab"},{"label":"GitHub","href":"https://infisical.com/docs/integrations/cicd/githubactions"},{"label":"SDK","href":"https://infisical.com/docs/sdks/overview"}]},{"header":"DEVELOPERS","items":[{"label":"Changelog","href":"https://github.com/Infisical/infisical/releases"},{"label":"Status","href":"https://status.infisical.com/"},{"label":"Feedback \u0026 Requests","href":"https://github.com/Infisical/infisical/issues"},{"label":"Trust of Center","href":"https://app.vanta.com/infisical.com/trust/hoop8cr78cuarxo9sztvs"},{"label":"Open Source Friends","href":"https://infisical.com/infisical-friends"},{"label":"How to contribute","href":"https://www.infisical.com/infisical-heroes"}]},{"header":"OTHERS","items":[{"label":"Customers","href":"https://infisical.com/customers/traba"},{"label":"Company Handbook","href":"https://infisical.com/wiki/handbook/overview"},{"label":"Careers","href":"https://infisical.com/careers"},{"label":"Terms of Service","href":"https://infisical.com/terms"},{"label":"Privacy Policy","href":"https://infisical.com/privacy"},{"label":"Subprocessors","href":"https://infisical.com/subprocessors"},{"label":"SLA","href":"https://infisical.com/sla"},{"label":"Support Email","href":"mailto:[email protected]"},{"label":"Sales","href":"mailto:[email protected]"},{"label":"Support","href":"https://community.infisical.com"}]}]},"fonts":{"heading":{"family":"Alliance","weight":400,"source":"https://infisical.com/docs/fonts/AllianceNo2-Regular.woff2","format":"woff2"}},"icons":{"library":"lucide"},"styling":{"eyebrows":"breadcrumbs","codeblocks":"dark","latex":false},"integrations":{"posthog":{"apiKey":"phc_Q0xfB3LeOqo7ySk4DE6zLNwDzHFesKcmigknCy4fTdV","apiHost":"https://p.infisical.com"},"koala":{"publicApiKey":"pk_b50d7184e0e39ddd5cdb43cf6abeadd9b97d"},"gtm":{"tagId":"GTM-WL5C7MWT"}},"contextual":{"options":["assistant","copy","view","chatgpt","claude","mcp"],"display":"header"},"thumbnails":{"preset":"classic","appearance":"light","background":"https://infisical.com/docs/images/docs-preview-yellow.png","fonts":{"family":"Alliance","source":"fonts/AllianceNo2-Regular.woff","format":"woff"},"eyebrow":{"source":"group","style":"plain","color":"#000000"}},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"infisical","hasAudioNarration":false,"actualSubdomain":"infisical","customDomains":["infisical.com"],"gitSource":{"type":"github","owner":"infisical","repo":"infisical","deployBranch":"main","contentDirectory":"docs","mountPath":"","label":""},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b09d59ccfd00c340367ef8d","clientVersion":"0.0.4344","searchFilterCounts":[{"language":"default","tag":"Reference","count":1969},{"language":"default","tag":"API","count":1927},{"language":"default","tag":"Secrets Management","count":958},{"language":"default","tag":"App connections","count":691},{"language":"default","tag":"Shared","count":601},{"language":"default","tag":"Secret syncs","count":446},{"language":"default","tag":"Products","count":421},{"language":"default","tag":"Certificate Management","count":343},{"language":"default","tag":"Platform","count":256},{"language":"default","tag":"Secret rotations","count":221}]},"assistantConfig":{"enableAskAiButton":true,"enableAskAiSearchBar":false},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"selectively-prewarm","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instinct-self-updating-docs","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","href":"/docs/_mintlify/custom/infisical/792e2875e269d30a/style.css"}]}
{"page":{"pagePath":"sdks/languages/ruby","slug":"/sdks/languages/ruby","pageMetadata":{"title":"Infisical Ruby SDK","sidebarTitle":"Ruby","description":"Fetch and manage secrets in a Ruby application with the official Infisical Ruby SDK.","icon":"/images/sdks/languages/ruby.svg","href":"/sdks/languages/ruby"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Fetch and manage secrets in a Ruby application with the official Infisical Ruby SDK.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,ParamField,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`If you’re working with Ruby, the official Infisical Ruby SDK package is the easiest way to fetch and work with secrets for your application.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`https://rubygems.org/gems/infisical-sdk`,children:`Package`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`https://github.com/Infisical/ruby-sdk`,children:`GitHub Repository`})}),`\n`]}),`\n`,_jsx(Heading,{level:`1`,id:`basic-usage`,children:`Basic usage`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`18`,language:`ruby`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`ruby`,children:_jsxs(_components.code,{language:`ruby`,numberOfLines:`18`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`require`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"infisical\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`client`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#4EC9B0`,\"--shiki-dark\":`#4EC9B0`},children:`Infisical::Client`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`new`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:`# Authenticate with a machine identity`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`client.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`auth`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`universal_auth_login`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` client_id:`}),_jsx(_components.span,{style:{color:`#4EC9B0`,\"--shiki-dark\":`#4EC9B0`},children:` ENV`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`fetch`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"INFISICAL_CLIENT_ID\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` client_secret:`}),_jsx(_components.span,{style:{color:`#4EC9B0`,\"--shiki-dark\":`#4EC9B0`},children:` ENV`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`fetch`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"INFISICAL_CLIENT_SECRET\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:`# Fetch a secret by name`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`secret`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` = client.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`secrets`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`get`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"API_KEY\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` project_id:`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"YOUR_PROJECT_ID\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` environment:`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"dev\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`puts`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` secret.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`secret_value`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`This example demonstrates how to use the Infisical Ruby SDK in a simple Ruby application. The application retrieves a secret named `,_jsx(_components.code,{children:`API_KEY`}),` from the `,_jsx(_components.code,{children:`dev`}),` environment of the `,_jsx(_components.code,{children:`YOUR_PROJECT_ID`}),` project.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`We don’t recommend hardcoding your `,_jsx(_components.a,{href:`/documentation/platform/identities/machine-identities`,children:`Machine Identity\nTokens`}),`. Setting it as\nan environment variable would be best.`]})}),`\n`,_jsx(Heading,{level:`1`,id:`installation`,children:`Installation`}),`\n`,_jsx(_components.p,{children:`The SDK requires Ruby 3.0.0 or higher.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellsession`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`shellsession`,children:_jsxs(_components.code,{language:`shellsession`,numberOfLines:`1`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`gem install infisical-sdk`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Or add it to your Gemfile:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`ruby`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`ruby`,children:_jsxs(_components.code,{language:`ruby`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`gem `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"infisical-sdk\"`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`1`,id:`configuration`,children:`Configuration`}),`\n`,_jsxs(_components.p,{children:[`Require the SDK and create a client instance. The require path is `,_jsx(_components.code,{children:`\"infisical\"`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`ruby`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`ruby`,children:_jsxs(_components.code,{language:`ruby`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`require`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"infisical\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`client`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#4EC9B0`,\"--shiki-dark\":`#4EC9B0`},children:`Infisical::Client`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`new`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` site_url:`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"https://app.infisical.com\"`}),_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:` # Optional, defaults to https://app.infisical.com`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`configuration-options`,children:`Configuration options`}),`\n`,_jsx(ParamField,{query:`options`,type:`object`,id:`param-options`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{query:`site_url`,type:`string`,optional:true,default:`https://app.infisical.com`,id:`param-site-url`,children:_jsx(_components.p,{children:`The URL of the Infisical instance. Set this to your instance URL when self-hosting Infisical.`})}),_jsx(ParamField,{query:`timeout`,type:`integer`,optional:true,default:`10`,id:`param-timeout`,children:_jsx(_components.p,{children:`The timeout, in seconds, for HTTP requests made by the SDK.`})})]})}),`\n`,_jsx(Heading,{level:`1`,id:`authentication`,children:`Authentication`}),`\n`,_jsxs(_components.p,{children:[`The SDK authenticates as a `,_jsx(_components.a,{href:`/documentation/platform/identities/machine-identities`,children:`machine identity`}),`. The most common authentication method is Universal Auth, which uses a client ID and client secret. If you already have a valid access token, you can also set it on the client directly.`]}),`\n`,_jsx(Heading,{level:`3`,id:`universal-auth`,children:`Universal auth`}),`\n`,_jsx(_components.p,{children:`Log in with a machine identity’s client ID and client secret. On success, the returned access token is stored on the client and used for all subsequent requests.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`ruby`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`ruby`,children:_jsxs(_components.code,{language:`ruby`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`client.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`auth`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`universal_auth_login`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` client_id:`}),_jsx(_components.span,{style:{color:`#4EC9B0`,\"--shiki-dark\":`#4EC9B0`},children:` ENV`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`fetch`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"INFISICAL_CLIENT_ID\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` client_secret:`}),_jsx(_components.span,{style:{color:`#4EC9B0`,\"--shiki-dark\":`#4EC9B0`},children:` ENV`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`fetch`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"INFISICAL_CLIENT_SECRET\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Parameters`})}),`\n`,_jsx(ParamField,{query:`Parameters`,type:`object`,id:`param-parameters`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{query:`client_id`,type:`string`,required:true,id:`param-client-id`,children:_jsx(_components.p,{children:`The client ID of your machine identity.`})}),_jsx(ParamField,{query:`client_secret`,type:`string`,required:true,id:`param-client-secret`,children:_jsx(_components.p,{children:`The client secret of your machine identity.`})})]})}),`\n`,_jsx(Heading,{level:`3`,id:`access-token`,children:`Access token`}),`\n`,_jsx(_components.p,{children:`If you already have a valid access token, set it on the client directly instead of logging in. This doesn’t make a network request.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`ruby`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`ruby`,children:_jsxs(_components.code,{language:`ruby`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`client.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`auth`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`access_token`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"YOUR_ACCESS_TOKEN\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Parameters`})}),`\n`,_jsx(ParamField,{query:`access_token`,type:`string`,required:true,id:`param-access-token`,children:_jsxs(_components.p,{children:[`The access token to authenticate with. This shouldn’t include the `,_jsx(_components.code,{children:`Bearer`}),` prefix.`]})}),`\n`,_jsx(Heading,{level:`1`,id:`secrets`,children:`Secrets`}),`\n`,_jsx(Heading,{level:`3`,id:`list-secrets`,children:`List secrets`}),`\n`,_jsx(_components.p,{children:_jsx(_components.code,{children:`client.secrets.list(options)`})}),`\n`,_jsx(_components.p,{children:`Retrieve all secrets within a project and environment. Returns an array of secret objects sorted by key.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`ruby`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`ruby`,children:_jsxs(_components.code,{language:`ruby`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`secrets`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` = client.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`secrets`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`list`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` project_id:`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"YOUR_PROJECT_ID\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` environment:`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"dev\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` secret_path:`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"/\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Parameters`})}),`\n`,_jsx(ParamField,{query:`Parameters`,type:`object`,id:`param-parameters-1`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{query:`project_id`,type:`string`,required:true,id:`param-project-id`,children:_jsx(_components.p,{children:`The ID of the project where the secrets live.`})}),_jsx(ParamField,{query:`environment`,type:`string`,required:true,id:`param-environment`,children:_jsx(_components.p,{children:`The slug name (dev, prod, etc.) of the environment from where secrets should be fetched.`})}),_jsx(ParamField,{query:`secret_path`,type:`string`,optional:true,default:`/`,id:`param-secret-path`,children:_jsx(_components.p,{children:`The path from where secrets should be fetched.`})}),_jsx(ParamField,{query:`include_imports`,type:`boolean`,optional:true,default:`true`,id:`param-include-imports`,children:_jsxs(_components.p,{children:[`Whether or not to include imported secrets from the current path. Read about `,_jsx(_components.a,{href:`/documentation/platform/secret-reference`,children:`secret import`}),`.`]})}),_jsx(ParamField,{query:`recursive`,type:`boolean`,optional:true,default:`false`,id:`param-recursive`,children:_jsx(_components.p,{children:`Whether or not to fetch secrets recursively from the specified path. Please note that there’s a 20-depth limit for recursive fetching.`})}),_jsx(ParamField,{query:`attach_to_process_env`,type:`boolean`,optional:true,default:`false`,id:`param-attach-to-process-env`,children:_jsxs(_components.p,{children:[`Whether or not to set the fetched secrets to the process environment (`,_jsx(_components.code,{children:`ENV`}),`). Only variables that are unset or empty are populated.`]})})]})}),`\n`,_jsx(Heading,{level:`3`,id:`retrieve-secret`,children:`Retrieve secret`}),`\n`,_jsx(_components.p,{children:_jsx(_components.code,{children:`client.secrets.get(secret_name, options)`})}),`\n`,_jsxs(_components.p,{children:[`Retrieve a single secret by name. Raises `,_jsx(_components.code,{children:`Infisical::NotFoundError`}),` if the secret doesn’t exist.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`ruby`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`ruby`,children:_jsxs(_components.code,{language:`ruby`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`secret`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` = client.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`secrets`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`get`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"API_KEY\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` project_id:`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"YOUR_PROJECT_ID\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` environment:`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"dev\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Parameters`})}),`\n`,_jsx(ParamField,{query:`Parameters`,type:`object`,id:`param-parameters-2`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{query:`secret_name`,type:`string`,required:true,id:`param-secret-name`,children:_jsx(_components.p,{children:`The name of the secret to retrieve. Passed as the first positional argument.`})}),_jsx(ParamField,{query:`project_id`,type:`string`,required:true,id:`param-project-id-1`,children:_jsx(_components.p,{children:`The ID of the project where the secret lives.`})}),_jsx(ParamField,{query:`environment`,type:`string`,required:true,id:`param-environment-1`,children:_jsx(_components.p,{children:`The slug name (dev, prod, etc.) of the environment from where the secret should be fetched.`})}),_jsx(ParamField,{query:`secret_path`,type:`string`,optional:true,default:`/`,id:`param-secret-path-1`,children:_jsx(_components.p,{children:`The path from where the secret should be fetched.`})}),_jsx(ParamField,{query:`include_imports`,type:`boolean`,optional:true,default:`true`,id:`param-include-imports-1`,children:_jsx(_components.p,{children:`Whether or not to include imported secrets when resolving the secret.`})})]})}),`\n`,_jsx(Heading,{level:`3`,id:`create-secret`,children:`Create secret`}),`\n`,_jsx(_components.p,{children:_jsx(_components.code,{children:`client.secrets.create(secret_name, secret_value, options)`})}),`\n`,_jsx(_components.p,{children:`Create a new secret. Returns the created secret.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`ruby`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`ruby`,children:_jsxs(_components.code,{language:`ruby`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`secret`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` = client.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`secrets`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"API_KEY\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"SECRET_VALUE\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` project_id:`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"YOUR_PROJECT_ID\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` environment:`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"dev\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Parameters`})}),`\n`,_jsx(ParamField,{query:`Parameters`,type:`object`,id:`param-parameters-3`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{query:`secret_name`,type:`string`,required:true,id:`param-secret-name-1`,children:_jsx(_components.p,{children:`The name of the secret to create. Passed as the first positional argument.`})}),_jsx(ParamField,{query:`secret_value`,type:`string`,required:true,id:`param-secret-value`,children:_jsx(_components.p,{children:`The value of the secret. Passed as the second positional argument.`})}),_jsx(ParamField,{query:`project_id`,type:`string`,required:true,id:`param-project-id-2`,children:_jsx(_components.p,{children:`The ID of the project where the secret will be created.`})}),_jsx(ParamField,{query:`environment`,type:`string`,required:true,id:`param-environment-2`,children:_jsx(_components.p,{children:`The slug name (dev, prod, etc.) of the environment where the secret will be created.`})}),_jsx(ParamField,{query:`secret_path`,type:`string`,optional:true,default:`/`,id:`param-secret-path-2`,children:_jsx(_components.p,{children:`The path where the secret should be created.`})}),_jsx(ParamField,{query:`secret_comment`,type:`string`,optional:true,id:`param-secret-comment`,children:_jsx(_components.p,{children:`A comment to associate with the secret.`})}),_jsx(ParamField,{query:`skip_multiline_encoding`,type:`boolean`,optional:true,id:`param-skip-multiline-encoding`,children:_jsx(_components.p,{children:`Whether or not to skip multiline encoding for the secret value.`})})]})}),`\n`,_jsx(Heading,{level:`3`,id:`update-secret`,children:`Update secret`}),`\n`,_jsx(_components.p,{children:_jsx(_components.code,{children:`client.secrets.update(secret_name, options)`})}),`\n`,_jsxs(_components.p,{children:[`Update an existing secret’s value, rename it, or both. You must provide at least one of `,_jsx(_components.code,{children:`secret_value`}),` or `,_jsx(_components.code,{children:`new_secret_name`}),`, otherwise an `,_jsx(_components.code,{children:`ArgumentError`}),` is raised. Returns the updated secret.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`ruby`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`ruby`,children:_jsxs(_components.code,{language:`ruby`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`secret`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` = client.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`secrets`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`update`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"API_KEY\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` project_id:`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"YOUR_PROJECT_ID\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` environment:`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"dev\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` secret_value:`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"UPDATED_SECRET_VALUE\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Parameters`})}),`\n`,_jsx(ParamField,{query:`Parameters`,type:`object`,id:`param-parameters-4`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{query:`secret_name`,type:`string`,required:true,id:`param-secret-name-2`,children:_jsx(_components.p,{children:`The name of the secret to update. Passed as the first positional argument.`})}),_jsx(ParamField,{query:`project_id`,type:`string`,required:true,id:`param-project-id-3`,children:_jsx(_components.p,{children:`The ID of the project where the secret lives.`})}),_jsx(ParamField,{query:`environment`,type:`string`,required:true,id:`param-environment-3`,children:_jsx(_components.p,{children:`The slug name (dev, prod, etc.) of the environment where the secret lives.`})}),_jsx(ParamField,{query:`secret_value`,type:`string`,optional:true,id:`param-secret-value-1`,children:_jsxs(_components.p,{children:[`The new value of the secret. Required unless `,_jsx(_components.code,{children:`new_secret_name`}),` is provided.`]})}),_jsx(ParamField,{query:`new_secret_name`,type:`string`,optional:true,id:`param-new-secret-name`,children:_jsxs(_components.p,{children:[`A new name for the secret. Required unless `,_jsx(_components.code,{children:`secret_value`}),` is provided.`]})}),_jsx(ParamField,{query:`secret_path`,type:`string`,optional:true,default:`/`,id:`param-secret-path-3`,children:_jsx(_components.p,{children:`The path where the secret lives.`})}),_jsx(ParamField,{query:`skip_multiline_encoding`,type:`boolean`,optional:true,id:`param-skip-multiline-encoding-1`,children:_jsx(_components.p,{children:`Whether or not to skip multiline encoding for the new secret value.`})})]})}),`\n`,_jsx(Heading,{level:`3`,id:`delete-secret`,children:`Delete secret`}),`\n`,_jsx(_components.p,{children:_jsx(_components.code,{children:`client.secrets.delete(secret_name, options)`})}),`\n`,_jsxs(_components.p,{children:[`Delete a secret by name. Raises `,_jsx(_components.code,{children:`Infisical::NotFoundError`}),` if the secret doesn’t exist. Returns the deleted secret.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`ruby`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`ruby`,children:_jsxs(_components.code,{language:`ruby`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`secret`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` = client.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`secrets`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`delete`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"API_KEY\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` project_id:`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"YOUR_PROJECT_ID\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` environment:`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"dev\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Parameters`})}),`\n`,_jsx(ParamField,{query:`Parameters`,type:`object`,id:`param-parameters-5`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{query:`secret_name`,type:`string`,required:true,id:`param-secret-name-3`,children:_jsx(_components.p,{children:`The name of the secret to delete. Passed as the first positional argument.`})}),_jsx(ParamField,{query:`project_id`,type:`string`,required:true,id:`param-project-id-4`,children:_jsx(_components.p,{children:`The ID of the project where the secret lives.`})}),_jsx(ParamField,{query:`environment`,type:`string`,required:true,id:`param-environment-4`,children:_jsx(_components.p,{children:`The slug name (dev, prod, etc.) of the environment where the secret lives.`})}),_jsx(ParamField,{query:`secret_path`,type:`string`,optional:true,default:`/`,id:`param-secret-path-4`,children:_jsx(_components.p,{children:`The path where the secret lives.`})})]})}),`\n`,_jsx(Heading,{level:`3`,id:`the-secret-object`,children:`The secret object`}),`\n`,_jsxs(_components.p,{children:[`Every secret operation returns an `,_jsx(_components.code,{children:`Infisical::Models::Secret`}),` with the following readers:`]}),`\n`,_jsx(ParamField,{query:`Secret`,type:`object`,id:`param-secret`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{query:`secret_key`,type:`string`,id:`param-secret-key`,children:_jsx(_components.p,{children:`The name of the secret.`})}),_jsx(ParamField,{query:`secret_value`,type:`string`,id:`param-secret-value-2`,children:_jsx(_components.p,{children:`The value of the secret.`})}),_jsx(ParamField,{query:`secret_comment`,type:`string`,id:`param-secret-comment-1`,children:_jsx(_components.p,{children:`The comment associated with the secret.`})}),_jsx(ParamField,{query:`secret_path`,type:`string`,id:`param-secret-path-5`,children:_jsx(_components.p,{children:`The path the secret lives at.`})}),_jsx(ParamField,{query:`environment`,type:`string`,id:`param-environment-5`,children:_jsx(_components.p,{children:`The environment slug the secret belongs to.`})}),_jsx(ParamField,{query:`workspace`,type:`string`,id:`param-workspace`,children:_jsx(_components.p,{children:`The ID of the project the secret belongs to.`})}),_jsx(ParamField,{query:`version`,type:`integer`,id:`param-version`,children:_jsx(_components.p,{children:`The version number of the secret.`})}),_jsx(ParamField,{query:`type`,type:`string`,id:`param-type`,children:_jsxs(_components.p,{children:[`The secret type, either `,_jsx(_components.code,{children:`shared`}),` or `,_jsx(_components.code,{children:`personal`}),`.`]})}),_jsx(ParamField,{query:`id`,type:`string`,id:`param-id`,children:_jsx(_components.p,{children:`The unique ID of the secret.`})}),_jsx(ParamField,{query:`created_at`,type:`string`,id:`param-created-at`,children:_jsx(_components.p,{children:`When the secret was created.`})}),_jsx(ParamField,{query:`updated_at`,type:`string`,id:`param-updated-at`,children:_jsx(_components.p,{children:`When the secret was last updated.`})})]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"Infisical Ruby SDK","sidebarTitle":"Ruby","description":"Fetch and manage secrets in a Ruby application with the official Infisical Ruby SDK.","icon":"/images/sdks/languages/ruby.svg","href":"/sdks/languages/ruby"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Basic usage","slug":"basic-usage","depth":1,"children":[]},{"title":"Installation","slug":"installation","depth":1,"children":[]},{"title":"Configuration","slug":"configuration","depth":1,"children":[{"title":"Configuration options","slug":"configuration-options","depth":3,"children":[]}]},{"title":"Authentication","slug":"authentication","depth":1,"children":[{"title":"Universal auth","slug":"universal-auth","depth":3,"children":[]},{"title":"Access token","slug":"access-token","depth":3,"children":[]}]},{"title":"Secrets","slug":"secrets","depth":1,"children":[{"title":"List secrets","slug":"list-secrets","depth":3,"children":[]},{"title":"Retrieve secret","slug":"retrieve-secret","depth":3,"children":[]},{"title":"Create secret","slug":"create-secret","depth":3,"children":[]},{"title":"Update secret","slug":"update-secret","depth":3,"children":[]},{"title":"Delete secret","slug":"delete-secret","depth":3,"children":[]},{"title":"The secret object","slug":"the-secret-object","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/infisical/b13a5df316344f52/unify.js","/docs/_mintlify/custom/infisical/bc9046d1d11b5448/field-name-copy.js","/docs/_mintlify/custom/infisical/fdfdc80c034be768/cli-reference-nav.js"],"subdomain":"infisical","siteName":"Infisical","title":"Infisical Ruby SDK - Infisical","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-03T17:09:28.482Z","originalFileLocation":"sdks/languages/ruby.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Fetch and manage secrets in a Ruby application with the official Infisical Ruby SDK.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Infisical\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/x-icon\" sizes=\"180x180\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/infisical/favicon.ico\">\u003clink data-mint-head rel=\"icon\" type=\"image/x-icon\" sizes=\"32x32\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/infisical/favicon.ico\">\u003clink data-mint-head rel=\"icon\" type=\"image/x-icon\" sizes=\"16x16\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/infisical/favicon.ico\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/infisical/favicon.ico\">\u003cmeta data-mint-head property=\"og:title\" content=\"Infisical Ruby SDK - Infisical\">\u003cmeta data-mint-head property=\"og:description\" content=\"Fetch and manage secrets in a Ruby application with the official Infisical Ruby SDK.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Infisical\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://infisical.com/docs/sdks/languages/ruby\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://infisical.mintlify.site/docs/_mintlify/api/og/v2?division=SDK%27s\u0026amp;title=Infisical+Ruby+SDK\u0026amp;description=Fetch+and+manage+secrets+in+a+Ruby+application+with+the+official+Infisical+Ruby+SDK.\u0026amp;theme=b0e9e71d2b2f25bc38c03fbe\u0026amp;signature=52ea84312d14cff52485edb901e85c83e61dd2feeb46505cc065bf8d5384cc2f\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Infisical Ruby SDK - Infisical\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Fetch and manage secrets in a Ruby application with the official Infisical Ruby SDK.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://infisical.mintlify.site/docs/_mintlify/api/og/v2?division=SDK%27s\u0026amp;title=Infisical+Ruby+SDK\u0026amp;description=Fetch+and+manage+secrets+in+a+Ruby+application+with+the+official+Infisical+Ruby+SDK.\u0026amp;theme=b0e9e71d2b2f25bc38c03fbe\u0026amp;signature=52ea84312d14cff52485edb901e85c83e61dd2feeb46505cc065bf8d5384cc2f\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"https://mintlify.s3.us-west-1.amazonaws.com/infisical/_generated/favicon/browserconfig.xml?v=3\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Infisical\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#26272b\">\u003clink data-mint-head rel=\"canonical\" href=\"https://infisical.com/docs/sdks/languages/ruby\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/sdks/languages/ruby.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://infisical.com/#organization\",\"name\":\"Infisical\",\"url\":\"https://infisical.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintlify.s3.us-west-1.amazonaws.com/infisical/logo/light.svg\"}},{\"@type\":\"WebSite\",\"@id\":\"https://infisical.com/docs#website\",\"name\":\"Infisical\",\"url\":\"https://infisical.com/docs\",\"publisher\":{\"@id\":\"https://infisical.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://infisical.com/docs/sdks/languages/ruby#webpage\",\"url\":\"https://infisical.com/docs/sdks/languages/ruby\",\"name\":\"Infisical Ruby SDK\",\"description\":\"Fetch and manage secrets in a Ruby application with the official Infisical Ruby SDK.\",\"dateModified\":\"2026-09-03T17:09:28.482Z\",\"isPartOf\":{\"@id\":\"https://infisical.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://infisical.com/docs/sdks/languages/ruby#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://infisical.com/docs/sdks/languages/ruby#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"SDK's\",\"item\":\"https://infisical.com/docs/sdks/languages/node\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Infisical Ruby SDK\",\"item\":\"https://infisical.com/docs/sdks/languages/ruby\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://infisical.com/docs/sdks/languages/ruby#article\",\"headline\":\"Infisical Ruby SDK\",\"name\":\"Infisical Ruby SDK\",\"description\":\"Fetch and manage secrets in a Ruby application with the official Infisical Ruby SDK.\",\"url\":\"https://infisical.com/docs/sdks/languages/ruby\",\"mainEntityOfPage\":{\"@id\":\"https://infisical.com/docs/sdks/languages/ruby#webpage\"},\"dateModified\":\"2026-09-03T17:09:28.482Z\",\"publisher\":{\"@id\":\"https://infisical.com/#organization\"},\"isPartOf\":{\"@id\":\"https://infisical.com/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Infisical\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Infisical\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/sdks/languages/ruby.md","siteName":"Infisical","nav":{"global":null,"tabs":[{"tab":"Get started","pages":[{"title":"Get started","href":"/documentation/getting-started/overview"}]},{"tab":"Products","menu":[{"item":"Secrets Management","icon":"key","pages":[{"title":"Secrets Management","href":"/documentation/platform/secrets-mgmt/overview"}]},{"item":"Certificate Management","icon":"file-key","pages":[{"title":"Certificate Management","href":"/documentation/platform/pki/overview"}]},{"item":"Privileged Access Management (PAM)","icon":"users","pages":[{"title":"Privileged Access Management (PAM)","href":"/documentation/platform/pam/overview"}]},{"item":"Agent Vault","icon":"vault","pages":[{"title":"Agent Vault","href":"/documentation/platform/agent-vault/overview"}]},{"item":"Key Management Service (KMS)","icon":"lock","pages":[{"title":"Key Management Service (KMS)","href":"/documentation/platform/kms/overview"}]},{"item":"Secret Scanning","icon":"radar","pages":[{"title":"Secret Scanning","href":"/documentation/platform/secret-scanning/overview"}]}],"pages":[{"title":"Products","href":"/documentation/platform/secrets-mgmt/overview"}]},{"tab":"Platform","menu":[{"item":"Organizations","icon":"building","pages":[{"title":"Organizations","href":"/documentation/platform/organization"}]},{"item":"Identity and access","icon":"id-card","pages":[{"title":"Identity and access","href":"/documentation/platform/identities/overview"}]},{"item":"App connections","icon":"plug","pages":[{"title":"App connections","href":"/integrations/app-connections/overview"}]},{"item":"Networking","icon":"network","pages":[{"title":"Networking","href":"/documentation/platform/gateways/overview"}]},{"item":"Self-hosting","icon":"server","pages":[{"title":"Self-hosting","href":"/self-hosting/overview"}]},{"item":"Internals","icon":"workflow","pages":[{"title":"Internals","href":"/internals/overview"}]},{"item":"Contributing","icon":"git-pull-request","pages":[{"title":"Contributing","href":"/contributing/getting-started/overview"}]}],"pages":[{"title":"Platform","href":"/documentation/platform/organization"}]},{"tab":"Reference","icon":{"name":"code","library":"lucide"},"menu":[{"item":"CLI","icon":"terminal","pages":[{"title":"CLI","href":"/cli/overview"}]},{"item":"API","icon":"book-open","pages":[{"title":"API","href":"/api-reference/overview/introduction"}]},{"item":"SDKs","icon":"boxes","pages":[{"title":"SDKs","sidebarTitle":"SDKs","icon":"boxes","href":"/sdks/overview"},{"group":"Overview","pages":[]},{"group":"SDK's","pages":[{"title":"Infisical Node.js SDK","sidebarTitle":"Node.js","icon":"https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/sdks/languages/node.svg","href":"/sdks/languages/node"},{"title":"Infisical Python SDK","sidebarTitle":"Python","icon":"https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/sdks/languages/python.svg","href":"/sdks/languages/python"},{"title":"Infisical Java SDK","sidebarTitle":"Java","icon":"https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/sdks/languages/java.svg","href":"/sdks/languages/java"},{"title":"Infisical .NET SDK","sidebarTitle":".NET","icon":"https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/sdks/languages/dotnet.svg","href":"/sdks/languages/dotnet"},{"title":"Infisical C++ SDK","sidebarTitle":"C++","icon":"https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/sdks/languages/cpp.svg","href":"/sdks/languages/cpp"},{"title":"Infisical Rust SDK","sidebarTitle":"Rust","icon":"https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/sdks/languages/rust.svg","href":"/sdks/languages/rust"},{"title":"Infisical Go SDK","sidebarTitle":"Go","icon":"https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/sdks/languages/go.svg","href":"/sdks/languages/go"},{"title":"Infisical PHP SDK","sidebarTitle":"PHP","description":"Fetch and manage secrets in a PHP application with the official Infisical PHP SDK.","icon":"https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/sdks/languages/php.svg","href":"/sdks/languages/php"},{"title":"Infisical Ruby SDK","sidebarTitle":"Ruby","icon":"https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/sdks/languages/ruby.svg","href":"/sdks/languages/ruby"}]}]}]}]},"basePath":"","title":"Infisical Ruby SDK - Infisical","deploymentId":"dpl_3L1FNBg9Mynx3haQDgU9Rf9VMnSS","buildId":"dpl_3L1FNBg9Mynx3haQDgU9Rf9VMnSS","dynamics":[],"chunks":[]}