Foreman installer - Bundler command

Problem:
After fixing issue with missing pulpcore-selinux, foreman installer (via ansible playbook luna-devel staging) is failing on Centos 7 with error:

[ WARN 2020-03-12T07:45:19 verbose]  /Stage[main]/Candlepin::Database::Postgresql/Exec[cpdb update]/returns: executed successfully
[ INFO 2020-03-12T07:45:19 verbose]  Class[Candlepin::Database::Postgresql]: Scheduling refresh of Class[Candlepin::Qpid]
[ INFO 2020-03-12T07:45:19 verbose]  Class[Candlepin::Qpid]: Scheduling refresh of Qpid::Config::Exchange[event]
[ INFO 2020-03-12T07:45:19 verbose]  Qpid::Config::Exchange[event]: Scheduling refresh of Qpid::Config_cmd[ensure exchange event]
[ INFO 2020-03-12T07:45:19 verbose]  Qpid::Config_cmd[ensure exchange event]: Scheduling refresh of Exec[qpid-config ensure exchange event]
[ WARN 2020-03-12T07:45:20 verbose]  /Stage[main]/Candlepin::Qpid/Qpid::Config::Exchange[event]/Qpid::Config_cmd[ensure exchange event]/Exec[qpid-config ensure exchange event]: Triggered 'refresh' from 1 event
[ INFO 2020-03-12T07:45:20 verbose]  Class[Candlepin::Qpid]: Scheduling refresh of Class[Candlepin::Service]
[ INFO 2020-03-12T07:45:21 verbose]  Class[Candlepin::Service]: Scheduling refresh of Service[tomcat]
[ WARN 2020-03-12T07:45:21 verbose]  /Service[tomcat]: Triggered 'refresh' from 1 event
[ERROR 2020-03-12T07:45:21 verbose]  /var/tmp/sclgn8hnq: line 20: bundle: command not found
[ERROR 2020-03-12T07:45:21 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/exec.rb:77:in `run'
[ERROR 2020-03-12T07:45:21 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/exec/posix.rb:45:in `run'
.
.
.
[ERROR 2020-03-12T07:45:21 verbose]  /Stage[main]/Katello_devel::Setup/Katello_devel::Bundle[install --without mysql:mysql2 --retry 3 --jobs 3 --path .vendor]/Exec[bundle-install --without mysql:mysql2 --retry 3 --jobs 3 --path .vendor]/returns: change from 'notrun' to ['0'] failed: /var/tmp/sclgn8hnq: line 20: bundle: command not found
[ WARN 2020-03-12T07:45:21 verbose]  /Stage[main]/Katello_devel::Setup/Katello_devel::Bundle[exec npm install]/Exec[bundle-exec npm install]: Dependency Exec[bundle-install --without mysql:mysql2 --retry 3 --jobs 3 --path .vendor] has failures: true
[ WARN 2020-03-12T07:45:21 verbose]  /Stage[main]/Katello_devel::Setup/Katello_devel::Bundle[exec npm install]/Exec[bundle-exec npm install]: Skipping because of failed dependencies
[ WARN 2020-03-12T07:45:21 verbose]  /Stage[main]/Katello_devel::Setup/Katello_devel::Bundle[exec rake db:migrate]/Exec[bundle-exec rake db:migrate]: Skipping because of failed dependencies
[ WARN 2020-03-12T07:45:21 verbose]  /Stage[main]/Katello_devel::Setup/Katello_devel::Bundle[exec rake db:seed]/Exec[bundle-exec rake db:seed]: Skipping because of failed dependencies
[ WARN 2020-03-12T07:45:21 verbose]  /Stage[main]/Katello_devel::Setup/Katello_devel::Bundle[exec rails s -d]/Exec[bundle-exec rails s -d]: Skipping because of failed dependencies

.
.
.

Link to full log

Info

  • gem install bundler didn’t help
  • gem list local shows bundler (2.1.4, 1.16.1)
  • $PATH
    /opt/rh/rh-ruby25/root/usr/local/bin:/opt/rh/rh-ruby25/root/usr/bin:/opt/rh/rh-postgresql12/root/usr/bin:/opt/rh/rh-nodejs10/root/usr/bin:/usr/local/sbin:/usr/local/ bin:/usr/sbin:/usr/bin:/root/.gem/ruby/bin:/opt/puppetlabs/bin:/root/bin

Please, anybody got ideas how to fix this issue?

While this shouldn’t be needed, if you install additional gems to rpm based installation, you need to do it like this

scl enable tfm 'gem install bundler'

That will install a gem to the Software Collection envirionment that contains newer than system Ruby. Hope that unblocks you.