Knife compliance bug in new chef-workstation 26?

knife compliance
internal /hab/pkgs/core/ruby3_4/3.4.8/20260306111612/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb:136:in 'Kernel#require': cannot load such file -- html/table (LoadError)from internal /hab/pkgs/core/ruby3_4/3.4.8/20260306111612/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb:136:in 'Kernel#require'from /opt/fedex/chefdev/.chef/plugins/knife/compliance.rb:12:in 'block in class:Compliance'from /hab/pkgs/chef/knife/19.0.105/20260408092022/vendor/gems/knife-19.0.105/lib/chef/knife.rb:248:in 'Array#each'from /hab/pkgs/chef/knife/19.0.105/20260408092022/vendor/gems/knife-19.0.105/lib/chef/knife.rb:248:in 'Chef::Knife.load_deps'from /hab/pkgs/chef/knife/19.0.105/20260408092022/vendor/gems/knife-19.0.105/lib/chef/knife.rb:233:in 'Chef::Knife.run'from /hab/pkgs/chef/knife/19.0.105/20260408092022/vendor/gems/knife-19.0.105/lib/chef/application/knife.rb:166:in 'Chef::Application::Knife#run'from /hab/pkgs/chef/knife/19.0.105/20260408092022/vendor/gems/knife-19.0.105/bin/knife:24:in ''

We are currently evaluating Chef Workstation 26 in an existing enterprise environment that historically relied on knife compliance to execute InSpec compliance profiles and generate HTML reports (for example: knife compliance --profile <profile> --format html).

In Chef Workstation 25, this workflow operates as expected. After upgrading to Chef Workstation 26 (hab-based distribution), the same command is still available in the CLI help, but execution fails at runtime with missing Ruby dependencies (e.g. html/table), indicating that the Compliance/InSpec reporting runtime is no longer included.

At the moment, this forces us to keep both Chef Workstation 25 and 26 side-by-side, which increases operational complexity. We would like to understand:

  1. Whether knife compliance is considered deprecated or unsupported in Chef Workstation 26.

  2. If there is a planned future release where equivalent Compliance / InSpec functionality (including HTML report generation) will be reintroduced or officially supported in Workstation.

  3. If not, what the recommended, supported migration path is for customers who previously depended on knife compliance as part of their compliance reporting workflows.

Any clarification on the intended product direction would help us plan our tooling strategy going forward.

That stack trace is coming from your own plugin (`~/.chef/plugins/knife/compliance.rb`, line 12), not from knife itself. It does `require 'html/table'`, which comes from the `html-table` gem, and that gem simply isn't in the Ruby that Workstation 26 ships.

Workstation 26 is now built on Habitat packages (`/hab/pkgs/core/ruby3_4/...`), so it has its own isolated Ruby and gem path. Any extra gems you had installed into the old `/opt/chef-workstation/embedded` Ruby didn't carry over after the upgrade.

What should fix it is installing the gem into the Ruby knife is actually using:

```

chef gem install html-table

```

Then confirm knife can see it:

```

knife exec -E 'require "html/table"; puts "ok"'

```

If `chef gem` installs into a different location, run `knife exec -E 'puts Gem.path'` to see which gem paths knife really loads, and install there with `gem install html-table --install-dir `. If this is a shared team plugin, it's also worth adding a `begin/rescue LoadError` around that require, so a missing gem gives a clear message instead of breaking every knife command at load time.

1 Like