Hello,
Can you provide me with a proper steps how should I properly install “plugin” in Foreman?
In particular, I would like to install this one → GitHub - grizzthedj/smart_proxy_ipam: Foreman Smart Proxy plugin for integration with External IPA.
Although I followed the steps from how-to (Foreman :: Plugin Manuals) I was not able to install it ( I have Foreman 2.1 installed).
I did the following:
scl enable tfm bash
gem install --ignore-dependencies smart_proxy_ipam
vi ~foreman/bundler.d/Gemfile.local.rb
→ gem ‘smart_proxy_ipam’
foreman-rake bundler install
and got like:
root@foreman:/usr/share/foreman/bundler.d $ foreman-rake bundler install
rake aborted!
NameError: uninitialized constant Proxy::Plugin
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_hooks-0.3.17/lib/foreman_hooks/as_dependencies_hook.rb:4:in load_missing_constant' /opt/rh/rh-ruby25/root/usr/local/share/gems/gems/smart_proxy_ipam-0.1.4/lib/smart_proxy_ipam/ipam.rb:2:in
module:Ipam’
/opt/rh/rh-ruby25/root/usr/local/share/gems/gems/smart_proxy_ipam-0.1.4/lib/smart_proxy_ipam/ipam.rb:1:in <top (required)>' /opt/theforeman/tfm/root/usr/share/gems/gems/polyglot-0.3.5/lib/polyglot.rb:65:in
require’
/opt/rh/rh-ruby25/root/usr/local/share/gems/gems/smart_proxy_ipam-0.1.4/lib/smart_proxy_ipam.rb:2:in <top (required)>' /opt/theforeman/tfm/root/usr/share/gems/gems/polyglot-0.3.5/lib/polyglot.rb:65:in
require’
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/runtime.rb:41:in block in system_require' /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/runtime.rb:37:in
each’
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/runtime.rb:37:in system_require' /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb:19:in
block in system_require’
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb:14:in each' /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb:14:in
system_require’
/usr/share/foreman/config/application.rb:35:in <top (required)>' /usr/share/foreman/Rakefile:1:in
<top (required)>’
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.3/exe/rake:27:in `<top (required)>’
Caused by:
LoadError: cannot load such file – smart_proxy_ipam
/opt/theforeman/tfm/root/usr/share/gems/gems/polyglot-0.3.5/lib/polyglot.rb:65:in require' /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.1/lib/active_support/dependencies.rb:324:in
block in require’
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.1/lib/active_support/dependencies.rb:291:in load_dependency' /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.1/lib/active_support/dependencies.rb:324:in
require’
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/runtime.rb:41:in block in system_require' /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/runtime.rb:37:in
each’
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/runtime.rb:37:in system_require' /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb:19:in
block in system_require’
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb:14:in each' /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb:14:in
system_require’
/usr/share/foreman/config/application.rb:35:in <top (required)>' /usr/share/foreman/Rakefile:1:in
<top (required)>’
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.3/exe/rake:27:in <top (required)>' (See full trace by running task with --trace)e' /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb:19:in
block in system_require’
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb:14:in each' /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb:14:in
system_require’
/usr/share/foreman/config/application.rb:35:in <top (required)>' /usr/share/foreman/Rakefile:1:in
<top (required)>’
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.3/exe/rake:27:in `<top (required)>’
(See full trace by running task with --trace)
Also tried to run it as a “foreman” user but the outcome was the same.
What am I missing here?
Thanks for help in advance !