From c72f72e6a78ecd3b4f0c0bfe6d5d0ff52be280fd Mon Sep 17 00:00:00 2001 From: nitin sanghi Date: Mon, 24 Aug 2026 16:39:16 +0530 Subject: [PATCH 1/3] Update chef gem command doc for adding habitat gem install Signed-off-by: nitin sanghi --- content/workstation/26.1/tools/ctl_chef.md | 30 ++++++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/content/workstation/26.1/tools/ctl_chef.md b/content/workstation/26.1/tools/ctl_chef.md index 8694569ca..85ab2a22b 100644 --- a/content/workstation/26.1/tools/ctl_chef.md +++ b/content/workstation/26.1/tools/ctl_chef.md @@ -16,7 +16,7 @@ The `chef` executable is a command-line tool that does the following: - Generates repositories, cookbooks, recipes, attributes, templates, and custom resources. - Installs gems into the Chef development environment's Ruby installation. -- Helps you manage your [Policyfiles](/client/latest/policy/policyfile/). Please refer the Policyfile commands [section](#policyfile-commands). +- Helps you manage your [Policyfiles](/client/latest/policy/policyfile/). Refer to the Policyfile commands [section](#policyfile-commands). {{< note >}} @@ -31,7 +31,7 @@ To use a different cache location, set the `CHEF_WORKSTATION_HOME` environment v ## chef capture -The Chef Workstation 26 no longer support `chef capture` command. +Chef Workstation 26 no longer supports the `chef capture` command. ## chef env @@ -90,9 +90,29 @@ The `chef gem` subcommand is a wrapper around the `gem` command in RubyGems and is used by Chef to install RubyGems into Chef Workstation development environment. All knife plugins, drivers for Kitchen, and other Ruby applications that aren't packaged within Chef Workstation -will be installed to the `.Chef Workstation` path in the home directory: -`~/.Chef Workstation/gem/ruby/version#/bin` (where `version#` is the -version of Ruby that's packaged within Chef Workstation). +will be installed to the following locations: + +- **Habitat-based Chef Workstation**: gems are stored in `~/.chef/ruby/version#/bin` and persist across Workstation upgrades and downgrades. +- **Non-Habitat Chef Workstation**: gems are stored in `~/.Chef Workstation/gem/ruby/version#/bin` (where `` is the Ruby version bundled with Chef Workstation). + +### Premium gems +Chef Workstation can install premium extensions from the Chef Premium RubyGem server at rubygems.chef.io. When you run a remote gem command (install, search, fetch, update, or download), Chef Workstation automatically checks whether rubygems.chef.io is already configured and, if not, attempts to add it: + +| Condition | Behavior | +|-----------|----------| +| rubygems.chef.io already configured with valid credentials | Proceeds with the command. No changes to sources. | +| Only rubygems.org configured and a valid Chef license key is found | Adds `https://v1:@rubygems.chef.io` to gem sources using `gem sources --add`. Command proceeds against both sources. | +| A custom non-standard source is present (air-gapped environment) | Displays a warning and does not modify sources. Proceeds using existing sources only. | +| No Chef license key found | Displays a warning and proceeds using rubygems.org only. | +The license key is read from the following locations, in priority order: + +- `CHEF_LICENSE_KEY` environment variable +- Persisted license storage (set by `chef license add`) +{{< note >}} + +The `chef gem` command never prompts interactively for a license key. To configure a license key, run `chef license add` first. + +{{< /note >}} ### Syntax From 61ac25471ca75cc8a6b90b009143628b57ff1c8d Mon Sep 17 00:00:00 2001 From: nitin sanghi Date: Wed, 26 Aug 2026 12:38:09 +0530 Subject: [PATCH 2/3] Pipeline fix Signed-off-by: nitin sanghi --- content/workstation/26.1/tools/ctl_chef.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/content/workstation/26.1/tools/ctl_chef.md b/content/workstation/26.1/tools/ctl_chef.md index 85ab2a22b..a417dba5e 100644 --- a/content/workstation/26.1/tools/ctl_chef.md +++ b/content/workstation/26.1/tools/ctl_chef.md @@ -93,16 +93,17 @@ other Ruby applications that aren't packaged within Chef Workstation will be installed to the following locations: - **Habitat-based Chef Workstation**: gems are stored in `~/.chef/ruby/version#/bin` and persist across Workstation upgrades and downgrades. -- **Non-Habitat Chef Workstation**: gems are stored in `~/.Chef Workstation/gem/ruby/version#/bin` (where `` is the Ruby version bundled with Chef Workstation). +- **Non-Habitat Chef Workstation**: gems are stored in `~/.Chef Workstation/gem/ruby/version#/bin`, where `` represents the Ruby version bundled with Chef Workstation. ### Premium gems + Chef Workstation can install premium extensions from the Chef Premium RubyGem server at rubygems.chef.io. When you run a remote gem command (install, search, fetch, update, or download), Chef Workstation automatically checks whether rubygems.chef.io is already configured and, if not, attempts to add it: | Condition | Behavior | |-----------|----------| | rubygems.chef.io already configured with valid credentials | Proceeds with the command. No changes to sources. | | Only rubygems.org configured and a valid Chef license key is found | Adds `https://v1:@rubygems.chef.io` to gem sources using `gem sources --add`. Command proceeds against both sources. | -| A custom non-standard source is present (air-gapped environment) | Displays a warning and does not modify sources. Proceeds using existing sources only. | +| A custom non-standard source is present (air-gapped environment) | Displays a warning and doesn't modify sources. Proceeds using existing sources only. | | No Chef license key found | Displays a warning and proceeds using rubygems.org only. | The license key is read from the following locations, in priority order: From 2d8dbb0be28fb69729b152941c2907668aee810a Mon Sep 17 00:00:00 2001 From: nitin sanghi Date: Tue, 1 Sep 2026 13:29:20 +0530 Subject: [PATCH 3/3] Pr review suggestion change Signed-off-by: nitin sanghi --- content/workstation/26.1/tools/ctl_chef.md | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/content/workstation/26.1/tools/ctl_chef.md b/content/workstation/26.1/tools/ctl_chef.md index a417dba5e..bfb30730e 100644 --- a/content/workstation/26.1/tools/ctl_chef.md +++ b/content/workstation/26.1/tools/ctl_chef.md @@ -87,28 +87,17 @@ None. ## chef gem The `chef gem` subcommand is a wrapper around the `gem` command in -RubyGems and is used by Chef to install RubyGems into Chef Workstation +RubyGems and is used by Chef to install RubyGems into the Chef Workstation development environment. All knife plugins, drivers for Kitchen, and other Ruby applications that aren't packaged within Chef Workstation -will be installed to the following locations: - -- **Habitat-based Chef Workstation**: gems are stored in `~/.chef/ruby/version#/bin` and persist across Workstation upgrades and downgrades. -- **Non-Habitat Chef Workstation**: gems are stored in `~/.Chef Workstation/gem/ruby/version#/bin`, where `` represents the Ruby version bundled with Chef Workstation. +are stored in `~/.chef/ruby/version#/bin` and persist across Chef Workstation upgrades and downgrades. ### Premium gems -Chef Workstation can install premium extensions from the Chef Premium RubyGem server at rubygems.chef.io. When you run a remote gem command (install, search, fetch, update, or download), Chef Workstation automatically checks whether rubygems.chef.io is already configured and, if not, attempts to add it: +Chef Workstation can install premium gems from the Chef Premium RubyGem server at rubygems.chef.io. When you run a `chef gem` command, for example `chef gem install premium-gem`, Chef Workstation automatically checks whether rubygems.chef.io is already configured and, if not, attempts to add it. -| Condition | Behavior | -|-----------|----------| -| rubygems.chef.io already configured with valid credentials | Proceeds with the command. No changes to sources. | -| Only rubygems.org configured and a valid Chef license key is found | Adds `https://v1:@rubygems.chef.io` to gem sources using `gem sources --add`. Command proceeds against both sources. | -| A custom non-standard source is present (air-gapped environment) | Displays a warning and doesn't modify sources. Proceeds using existing sources only. | -| No Chef license key found | Displays a warning and proceeds using rubygems.org only. | -The license key is read from the following locations, in priority order: +If you don't configure a gem source for Chef premium gems, you can't install them. -- `CHEF_LICENSE_KEY` environment variable -- Persisted license storage (set by `chef license add`) {{< note >}} The `chef gem` command never prompts interactively for a license key. To configure a license key, run `chef license add` first.