Unable to install couchbase gem on ruby on rails

Currently I used ruby 2.6.3 and rails 6.0.1 and I am unable to install couchbase gem, I keep getting this error when trying to install the gem using command
gem install couchbase

Building native extensions. This could take a while…
ERROR: Error installing couchbase:
ERROR: Failed to build gem native extension.
current directory: /Users/user/.rvm/gems/ruby-2.6.3/gems/couchbase-3.1.1/ext
/Users/user/.rvm/rubies/ruby-2.6.3/bin/ruby -I /Users/user/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0 -r ./siteconf20210429-16269-1qsei29.rb extconf.rb
checking for cmake… no
*** 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:
–without-opt-include={opt-dir}/include --with-opt-lib --without-opt-lib={opt-dir}/lib
extconf.rb:25:in ``’: No such file or directory - --version (Errno::ENOENT)
from extconf.rb:25:in `’

To see why this extension failed to compile, please check the mkmf.log which can be found here:
extconf failed, exit code 1
Gem files will remain installed in /Users/user/.rvm/gems/ruby-2.6.3/gems/couchbase-3.1.1 for inspection.
Results logged to /Users/user/.rvm/gems/ruby-2.6.3/extensions/x86_64-darwin-18/2.6.0/couchbase-3.1.1/gem_make.out

libcouchbase is already installed
brew info libcouchbase

libcouchbase: stable 3.0.7 (bottled), HEAD
C library for Couchbase
/usr/local/Cellar/libcouchbase/3.0.7 (110 files, 4.1MB) *
Poured from bottle on 2021-04-29 at 18:56:19
From: homebrew-core/libcouchbase.rb at b8a6748e8af26ef35bb6cea8a6c7523a38249e0a · Homebrew/homebrew-core · GitHub
License: Apache-2.0
==> Dependencies
Build: cmake
Required: libev :heavy_check_mark: , libevent :heavy_check_mark: , libuv :heavy_check_mark: , openssl@1.1 :heavy_check_mark:
==> Options
Install HEAD version
==> Analytics
install: 674 (30 days), 1,734 (90 days), 7,217 (365 days)
install-on-request: 662 (30 days), 1,709 (90 days), 6,943 (365 days)
build-error: 0 (30 days

What did i miss?

Hi @asharmubasir, thanks for the question. Ruby SDK does not depend on libcouchbase, but it does depend on cmake.

You can fix this issue by brew install cmake and then retrying gem install couchbase.

ah thank you very much sir, it’s work now