NameError: uninitialized constant MiniMagick - unicorn fails to initialise

I have a CentOS 7.5 server running gitlab-ce.x86_64 11.0.1-ce.0.el7

a few weeks ago the yum subsystem applied updates to gitlab-ce grading from 10.8 to 11.0 then 11.1

Now I have a gitlab server which doers not accept connections from web browsers. I have fixed a couple of issues identified in the logs, but I don’t know how to deal with this MiniMagick unitialized constant.

Queries online advise ruby user to “add the minimagick gem” to their configuration

I am not very conversant with ruby, & in any case I would assume that the gitlab-ce bundle would contain all the gems required - so I would like to know …

  1. why am I seeing this error in /var/log/gitlab/unicorn/unicorn_stderr.log

  2. what can I do to “fix” this issue ?

Symptoms:

Unicorn starts - gitlab-ctl status shows a unicorn process running, but unicorn (on port 8080) does NOT appear in my list of LISTENing tcp ports - looking in the unicorn logs I uncovered the NameError message in the title.

netstat -tupnl | grep LISTEN
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 1399/master
tcp 0 0 0.0.0.0:8060 0.0.0.0:* LISTEN 20779/nginx: master
tcp 0 0 0.0.0.0:6783 0.0.0.0:* LISTEN 20722/alertmanager
tcp 0 0 127.0.0.1:9121 0.0.0.0:* LISTEN 20883/redis_exporte
tcp 0 0 127.0.0.1:9090 0.0.0.0:* LISTEN 21968/prometheus
tcp 0 0 127.0.0.1:9187 0.0.0.0:* LISTEN 20857/postgres_expo
tcp 0 0 127.0.0.1:9093 0.0.0.0:* LISTEN 20722/alertmanager
tcp 0 0 127.0.0.1:39461 0.0.0.0:* LISTEN 1323/java
tcp 0 0 127.0.0.1:9100 0.0.0.0:* LISTEN 20815/node_exporter
tcp 0 0 127.0.0.1:9229 0.0.0.0:* LISTEN 20754/gitlab-workho
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 20779/nginx: master
tcp 0 0 127.0.0.1:9168 0.0.0.0:* LISTEN 20741/ruby
tcp 0 0 0.0.0.0:6099 0.0.0.0:* LISTEN 1323/java
tcp 0 0 127.0.0.1:9236 0.0.0.0:* LISTEN 20730/gitaly
tcp 0 0 0.0.0.0:6100 0.0.0.0:* LISTEN 1323/java
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1482/sshd
tcp6 0 0 ::1:9168 :::* LISTEN 20741/ruby
tcp6 0 0 :::22 :::* LISTEN 1482/sshd

--------------------------- extracted from unicorn_stderr.log ---------------------------

I, [2018-08-22T15:50:21.194114 #29047] INFO – : Refreshing Gem list
NameError: uninitialized constant MiniMagick
/opt/gitlab/embedded/service/gitlab-rails/config/initializers/mini_magick.rb:1:in <top (required)>' /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/engine.rb:652:in block in load_config_initializer’
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/notifications.rb:166:in instrument' /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/engine.rb:651:in load_config_initializer’
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/engine.rb:616:in block (2 levels) in <class:Engine>' /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/engine.rb:615:in each’
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/engine.rb:615:in block in <class:Engine>' /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/initializable.rb:30:in instance_exec’
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/initializable.rb:30:in run' /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/initializable.rb:55:in block in run_initializers’
/opt/gitlab/embedded/lib/ruby/2.3.0/tsort.rb:228:in block in tsort_each' /opt/gitlab/embedded/lib/ruby/2.3.0/tsort.rb:350:in block (2 levels) in each_strongly_connected_component’
/opt/gitlab/embedded/lib/ruby/2.3.0/tsort.rb:422:in block (2 levels) in each_strongly_connected_component_from' /opt/gitlab/embedded/lib/ruby/2.3.0/tsort.rb:431:in each_strongly_connected_component_from’
/opt/gitlab/embedded/lib/ruby/2.3.0/tsort.rb:421:in block in each_strongly_connected_component_from' /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/initializable.rb:44:in each’
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/initializable.rb:44:in tsort_each_child' /opt/gitlab/embedded/lib/ruby/2.3.0/tsort.rb:415:in call’
/opt/gitlab/embedded/lib/ruby/2.3.0/tsort.rb:415:in each_strongly_connected_component_from' /opt/gitlab/embedded/lib/ruby/2.3.0/tsort.rb:349:in block in each_strongly_connected_component’
/opt/gitlab/embedded/lib/ruby/2.3.0/tsort.rb:347:in each' /opt/gitlab/embedded/lib/ruby/2.3.0/tsort.rb:347:in call’
/opt/gitlab/embedded/lib/ruby/2.3.0/tsort.rb:347:in each_strongly_connected_component' /opt/gitlab/embedded/lib/ruby/2.3.0/tsort.rb:226:in tsort_each’
/opt/gitlab/embedded/lib/ruby/2.3.0/tsort.rb:205:in tsort_each' /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/initializable.rb:54:in run_initializers’
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/application.rb:352:in initialize!' /opt/gitlab/embedded/service/gitlab-rails/config/environment.rb:11:in <top (required)>’
/opt/gitlab/embedded/service/gitlab-rails/config.ru:19:in require' /opt/gitlab/embedded/service/gitlab-rails/config.ru:19:in block in ’
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-1.6.10/lib/rack/builder.rb:55:in instance_eval' /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-1.6.10/lib/rack/builder.rb:55:in initialize’
/opt/gitlab/embedded/service/gitlab-rails/config.ru:1:in new' /opt/gitlab/embedded/service/gitlab-rails/config.ru:1:in
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/lib/unicorn.rb:56:in eval' /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/lib/unicorn.rb:56:in block in builder’
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:752:in build_app!' /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:129:in start’
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/bin/unicorn:126:in <top (required)>' /opt/gitlab/embedded/bin/unicorn:23:in load’
/opt/gitlab/embedded/bin/unicorn:23:in `<top (required)>’

-------------------------------------- repeats every 5 seconds or so ------------------------------------