Ask A Question

Notifications

You’re not receiving notifications from this thread.

[Hatch Deployment] - Cannot bundle commonmarker due to cmake

Lauro asked in Gems / Libraries

Im using commonmarker for the HTML::Pipeline::MarkdownFilter. And when trying to deploy my app, I get this exception:

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/home/deploy/lauroio/shared/bundle/ruby/2.4.0/gems/commonmarker-0.16.7/ext/commonmarker
/home/deploy/.rbenv/versions/2.4.1/bin/ruby -r
./siteconf20170721-22951-szfhyg.rb extconf.rb
checking for cmake... no



[ERROR]: cmake is required and not installed. Get it here: http://www.cmake.org/


*** 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:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/home/deploy/.rbenv/versions/2.4.1/bin/$(RUBY_BASE_NAME)

How can I instal cmake?

Reply

It's as easy as SSHing into your server and running sudo apt-get install cmake.

If you're interested in trying out a new feature, I added Scripts at the top of the page and you can create little bash scripts to install things like cmake. You can create a new Recipe and paste that line into that and tell it to run on your server (as root, not deploy) and it'll install it for ya.

Reply

Thanks Chris. Worked perfectly!

I forgot that Hatch sends an email with the deploy user's sudo password.

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 87,400+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.