Error install foreman-installer

Hello Team
i get this error while installing Foreman and puppet modules on centos 7 server :

usr/local/rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- kafo (LoadError) from /usr/local/rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:inrequire’
from /usr/sbin/foreman-installer:3:in `’

Q: does any one has got this error yet ??

Yes, i do.

I used a clean Centos 7 install, followed all the installation steps (2.1 Installation) from the Foreman 1.19 Manual.
And got the same message.

Q: Is there a package kernel_require.rb?

I think i got the solution:
$> gem install kafo
Will do the trick.

Something is really wrong, this works out of box, we haven’t seen any errors when running our installer.

The first post shows, that RVM is action here, so the RPM based Ruby and its gems are not used.

In my case there was a problem with kafo gem installation, Centos 7.7 was missing gcc package.
Simple fix is:

yum -y install gcc
gem install kafo

On a production system we always recommend to avoid using gem and always install it via packages. Recently we’ve learned that foreman-installer has the wrong shebang (/usr/bin/env ruby instead of /usr/bin/ruby) which may explain why it doesn’t always work. This needs a patch in packaging.