Hello! I’m again here for your help. I’m using `...
# bolt
v
Hello! I’m again here for your help. I’m using
Bolt
to manage a Windows host, and installing
Ruby
using
Chocolatey
. But Chocolatey adds installed Ruby to the path, and the next bolt run command triggers the following error:
Copy code
The task failed with exit code 1 and no stdout, but stderr contained:
  ruby.exe : <internal:C:/tools/ruby33/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:127:in `require': cannot load such file -- puppet (LoadError)
That’s because Bolt started to use not bundled Ruby but one from the
Path
environment variable. I can do:
Copy code
package { 'ruby':
  ensure          => '3.3.0.1',
  install_options => ['--params', '"/NoPath"'], // This
}
But it’s sometimes not working, and not reliable. Is there any option to ensure, that Bolt doesn’t use system Ruby from the
Path
? Is it the right way to solve it?