Foreman-installer command dosen't work

root@faiserver:/var/log/foreman-installer# foreman-installer --foreman-proxy-dhcp true
Traceback (most recent call last):
2: from /usr/sbin/foreman-installer:3:in <main>' 1: from /opt/puppetlabs/puppet/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in require’
/opt/puppetlabs/puppet/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require’: cannot load such file – kafo (LoadError)
kafofy installed
puppet 6.24.0
ruby 2.5.9

OS: Debian Buster

What’s the problem?

It looks like the Ruby from Puppet is used instead of the system Ruby.

Can you check what the shebang in /usr/sbin/foreman-installer is? I suspect it’s /usr/bin/env ruby and your $PATH ends up resolving that to Puppet’s Ruby. I recall this being a problem in the past and we must not have fixed it.

1 Like