Problem:
Hammer fails to run due to missing libararies. Of course, the library file it can’t find exists. The problem appears to be with the ruby 2.5 scl. This is a fresh baremetal RHEL 7.6 install, and a fresh Foreman 1.20 install, all defaults. Just following instructions on the quick start documentation. See trace below.
While troubleshooting the hammer-cli gem installation I notice that the ruby24 and ruby25 gem command fails with the same error.
Foreman and Proxy versions:
foreman-1.20.1-1.el7.noarch
foreman-proxy-1.20.1-1.el7.noarch
Foreman and Proxy plugin versions:
Other relevant data:
[e.g. logs from Foreman and/or the Proxy, modified templates, commands issued, etc]
(for logs, surround with three back-ticks to get proper formatting, e.g.)
[root@foreman-ks-test ~]# hammer --help
Traceback (most recent call last):
17: from /usr/bin/hammer:23:in `<main>'
16: from /usr/bin/hammer:23:in `load'
15: from /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.15.1/bin/hammer:124:in `<top (required)>'
14: from /opt/rh/rh-ruby25/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:59:in `require'
13: from /opt/rh/rh-ruby25/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:59:in `require'
12: from /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.15.1/lib/hammer_cli.rb:17:in `<top (required)>'
11: from /opt/rh/rh-ruby25/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:59:in `require'
10: from /opt/rh/rh-ruby25/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:59:in `require'
9: from /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.15.1/lib/hammer_cli/abstract.rb:10:in `<top (required)>'
8: from /opt/rh/rh-ruby25/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:59:in `require'
7: from /opt/rh/rh-ruby25/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:59:in `require'
6: from /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.15.1/lib/hammer_cli/help/builder.rb:1:in `<top (required)>'
5: from /opt/rh/rh-ruby25/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:59:in `require'
4: from /opt/rh/rh-ruby25/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:59:in `require'
3: from /opt/theforeman/tfm/root/usr/share/gems/gems/unicode-0.4.4.1/lib/unicode.rb:1:in `<top (required)>'
2: from /opt/theforeman/tfm/root/usr/share/gems/gems/unicode-0.4.4.1/lib/unicode.rb:5:in `rescue in <top (required)>'
1: from /opt/rh/rh-ruby25/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:59:in `require'
/opt/rh/rh-ruby25/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:59:in `require': libruby.so.2.4: cannot open shared object file: No such file or directory - /opt/theforeman/tfm/root/usr/lib64/gems/ruby/unicode-0.4.4.1/unicode/unicode_native.so (LoadError)