install couchbase gem in embedded ruby of sensu-client


#1

Hi,

I wrote new plugin that write document to couchbase and check if it replicated using xdcr to another couchbase cluster.

my plugin use couchbase gem and when I install it from OS gem everything works fine because I already installed the dependency package (libcouchbase-dev)

when I try to install using sensu embedded ruby I get an error. I try to pass it options like --with-libcouchbase-dir but it didn’t work

this is the error message:

root@name1:/opt/sensu/embedded/bin# ./gem install couchbase

Fetching: yaji-0.3.5.gem (100%)

Building native extensions. This could take a while…

Successfully installed yaji-0.3.5

Fetching: connection_pool-2.2.0.gem (100%)

Successfully installed connection_pool-2.2.0

Fetching: couchbase-1.3.14.gem (100%)

Building native extensions. This could take a while…

ERROR: Error installing couchbase:

ERROR: Failed to build gem native extension.

/opt/sensu/embedded/bin/ruby extconf.rb

checking for lcb_iops_wire_bsd_impl2(NULL, 0) in -lcouchbase… 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:

--with-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=/opt/sensu/embedded/bin/ruby

--with-libcouchbase-dir

--without-libcouchbase-dir

--with-libcouchbase-include

--without-libcouchbase-include=${libcouchbase-dir}/include

--with-libcouchbase-lib

--without-libcouchbase-lib=${libcouchbase-dir}/

--with-couchbaselib

--without-couchbaselib

Gem files will remain installed in /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/couchbase-1.3.14 for inspection.

Results logged to /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/couchbase-1.3.14/ext/couchbase_ext/gem_make.out