CMake missing when adding discourse-code-review, sometimes

This seems similar to ERROR: CMake is required to build Rugged, but I just tried a bootstrap and it failed if I didn’t do

    - exec:
        cd: $home
          - apt update
          - apt -y install cmake

It failed like this.

I, [2020-06-22T17:13:16.381492 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'    
ERROR:  Error installing rugged:
        ERROR: Failed to build gem native extension.            
    current directory: /var/www/discourse/plugins/discourse-code-review/gems/2.6.5/gems/rugged-
/usr/local/bin/ruby -I /usr/local/lib/ruby/site_ruby/2.6.0 -r ./siteconf20200622-21455-f9skgp.rb extconf.rb
checking for gmake... no                
checking for make... yes
checking for cmake... no
ERROR: CMake is required to build Rugged.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:

To see why this extension failed to compile, please check the mkmf.log which can be found here:


extconf failed, exit code 1

But on another system I was able to add the plugin without it. Both are fairly standard web_only.yml (broken one launches to kubernetes, the working one has traefik as reverse proxy, but I don’t see how that would affect whether bootstrap would run!).

Just leaving this in case my workaround will help someone else or someone who knows something will recognize something that should be changed.

1 Like

Latest image already contains cmake installed. Are you stuck on a old image? A rebuild does the update.


Aha. rebuild does an update, but bootstrap does not. And on the other system, I’d done a rebuild for something more recently. That explains it, and I guess I need to go double-check that my bootstraps are doing a git pull.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.