Slackbot
06/12/2023, 9:24 PMnlew
06/12/2023, 9:26 PMexport GEM_HOME=~/.gem causes it to install to your user-local gems instead of to Bolt’s Ruby install, so when you run Bolt it can’t find the gem.nlew
06/12/2023, 9:26 PMGEM_HOME and will cause a similar problem.hbui
06/12/2023, 9:28 PMnlew
06/12/2023, 9:29 PMhbui
06/12/2023, 9:30 PMmail gem for bolt on their workstationhbui
06/12/2023, 9:30 PMnlew
06/12/2023, 9:30 PMhbui
06/12/2023, 9:31 PMnlew
06/12/2023, 9:31 PMhbui
06/12/2023, 9:31 PMhbui
06/12/2023, 9:32 PM#!/opt/puppetlabs/puppet/bin/ruby
require 'json'
require 'mail'nlew
06/12/2023, 9:33 PMhbui
06/12/2023, 9:33 PM# /opt/puppetlabs/puppet/bin/gem list mail
*** LOCAL GEMS ***hbui
06/12/2023, 9:34 PMnlew
06/12/2023, 9:34 PMrequire’ which does reference /opt/puppetlabs/bolt, hmmhbui
06/12/2023, 9:34 PMnlew
06/12/2023, 9:35 PM/opt/puppetlabs/puppet/bin/gem install mail instead of /opt/puppetlabs/bolt/bin/gemnlew
06/12/2023, 9:35 PM~/.gem, that’s strange.hbui
06/12/2023, 9:36 PMgem from the system, puppet/bin, and bolt/bin and the task won't see itnlew
06/12/2023, 9:36 PM/opt/puppetlabs/bolt/bin/gem install mail to work without GEM_HOME setnlew
06/12/2023, 9:37 PMbolt plan run <...>?hbui
06/12/2023, 9:38 PMhbui
06/12/2023, 9:40 PMnlew
06/12/2023, 9:41 PM~/.puppetlabs/etc/bolt/bolt-defaults.yaml that changes how it runs ruby taskshbui
06/12/2023, 9:47 PMYury Bushmelev
06/13/2023, 9:17 AM