commonmarker: Cannot bundle commonmarker due to cmake
Env:
Rails 5.1, Ruby 2.4.0, Commonmarker 0.16.0
When trying to install the gem via bundle after specifying it in my gemfile, I get this exception:
I’m on MacOS Sierra if it helps.
Installing commonmarker 0.16.0 with native extensions
Using activesupport 5.1.1
Using loofah 2.0.3
Using mail 2.6.5
Using bootstrap 4.0.0.alpha6
Using listen 3.0.8
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /Users/nynhex/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/commonmarker-0.16.0/ext/commonmarker
/Users/nynhex/.rbenv/versions/2.4.0/bin/ruby -r ./siteconf20170613-3919-pkz56n.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=/Users/nynhex/.rbenv/versions/2.4.0/bin/$(RUBY_BASE_NAME)
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Users/nynhex/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/extensions/x86_64-darwin-16/2.4.0-static/commonmarker-0.16.0/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Users/nynhex/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/commonmarker-0.16.0 for
inspection.
Results logged to
/Users/nynhex/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/extensions/x86_64-darwin-16/2.4.0-static/commonmarker-0.16.0/gem_make.out
An error occurred while installing commonmarker (0.16.0), and Bundler cannot continue.
Make sure that `gem install commonmarker -v '0.16.0'` succeeds before bundling.
Any thoughts on this? I’m needing this dependency for HTML pipeline for markdown parsing.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 19 (1 by maintainers)
brew install cmake
fixed it.@gjtorikian Hi.
Yep I attempted many variants … bundle update, bundle install.
gem install make (which it did install … but it wouldn’t be found when I then did a bundle install or update).
I’m using the github pages gem which locks in various versions.
I attempted to slide back the github pages gem version but that didn’t yield any great progress.
I think this is still an issue.
I used the WindowInstaller for Ruby and also MSYS2; wondering if there is a windows path issue or something? Just guessing. But it looks a lot like the above issue, hence all this.
@doublewordplay I had the same issue after setting up WSL. For me, I realized it was probably b/c I didn’t have all the build tools available. I ended up grabbing
build-essential
which was able to resolve it for me:sudo apt-get install build-essential