Crash: LoadError: cannot load such file -- bundler_ext

So, I had a working installation of Foreman (used only for reporting from my puppet server, which is on a different host) running until yesterday.

My boss wanted to have additional columns in the hosts-view and after much looking I found foreman_column_view, which I thought I’d try.

That led to my Foreman now crashing at every touch, with the error in the subject…

I spent most of yesterday trying to find out why it doesn’t find the installed bundler_ext (0.4.1), and this morning I decided to start from scratch.
I removed foreman completely and re-installed it.
And now I get the error already when running foreman-installer…

Please help me get this thing running again!!

I missed to type my environment:
RHEL 7
Foreman 1.24.1

The full error:

rake aborted!
LoadError: cannot load such file -- bundler_ext
/usr/share/foreman/config/application.rb:16:in `require'
/usr/share/foreman/config/application.rb:16:in `<top (required)>'
/usr/share/foreman/Rakefile:1:in `require'
/usr/share/foreman/Rakefile:1:in `<top (required)>'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
(See full trace by running task with --trace)

Always do a VM snapshot before trying out plugins or doing any kind of dangerous things. This looks like some packaging issue, @packaging ?

  • How did you install foreman_column_view?
  • How did you remove Foreman? Is it a fresh machine?

I don’t have foreman_column_view installed yet.
I removed Foreman using
yum -y erase *foreman*

What difference does it make how I removed it?
Why doesn’t foreman-rake find the installed bundler_ext?
I now have it in 3 different places in my filesystem, but still it’s not found:
/opt/rh/rh-ruby25/root/usr/local/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb /usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb

I could freshly install the machine - if absolutely necessary…

But you tried installing it, and I wonder how you did it, to understand where the issue might be coming from.

If something damaged your Ruby/SCL install, and you just purged Foreman itself, your Ruby is still broken and reinstalling Foreman won’t help.

/opt/rh/rh-ruby25/root/usr/local/share/gems/gems/bundler_ext-0.4.1 should not exist, the local in the path implies it was created by a gem install or similar.

Can you post the output of scl enable rh-ruby25 -- gem list --all bundler_ext and scl enable tfm -- gem list --all bundler_ext. On a vanilla foreman install, the first command should not return any gems, but I’d expect yours does.

Can you also post ls /opt/rh/rh-ruby25/root/usr/local/share/gems/gems/?

scl enable rh-ruby25 -- gem list --all bundler_ext

*** LOCAL GEMS ***

bundler_ext (0.4.1)
[root@host foreman]# scl enable tfm -- gem list --all bundler_ext

*** LOCAL GEMS ***

bundler_ext (0.4.1)
[root@host foreman]# ls /opt/rh/rh-ruby25/root/usr/local/share/gems/gems/
bundler-2.1.4  bundler_ext-0.4.1  mini_portile2-2.4.0

I tried it by gem install foreman_column_view which in turn installed mini_portile2

This was installed by me today, to test if I could get foreman-rake to use it.

Any more tips @evgeni?

I would always avoid using gem install foreman_column_view. If that’s what you did in the first place, you’re probably mixing different Ruby versions. Did you install the RPM on the first try?

Not really. You could try scl enable rh-ruby25 -- gem uninstall bundler_ext but I doubt it’ll help :frowning:

So, why did you want me to supply you with all that information then? Just to be able to tell me I’d done something wrong? As if I hadn’t figured that out myself, since it stopped working after I had tried to install the plugin.

So, clean install then, and do not try to install the column_view plugin?

Only in the later reply you mentioned you used gem install.

There is an RPM for this. It was probably assumed you used this.

I didn’t know about the rpm, I’ll try that next time - and hope (and maybe pray) for a better result.

Well, I was hoping for either gem itself to complain, or to see anything further unexpected in the output.

So yeah, fresh install / restore from a good backup is the way to go here I’m afraid.

We probably should mark that plugin as unmaintained.

So, what’s the recommended solution to getting additional columns to show in the hosts view then?

I’ll try, but the manually installed version of the gem was installed after this problem showed itself for the first time, as a try for remediation of the (as indicated) missing gem…