isamu / rocksdb-ruby

A simple RocksDB library for Ruby
MIT License
75 stars 24 forks source link

Installing rocksdb and rockdb-ruby #5

Closed maasha closed 10 years ago

maasha commented 10 years ago

Hello there,

I wanted to test rocksdb and rocksdb-ruby, but I am stuck. I downloaded and compiled rockdb on my Mac, but since it doesn't have an install script I added the rocksdb include path to CPATH, but I fail to see where the library path is so I get this:

$ gem install rocksdb-ruby
Building native extensions.  This could take a while...
ERROR:  Error installing rocksdb-ruby:
    ERROR: Failed to build gem native extension.

    /Users/maasha/install/bin/ruby extconf.rb
checking for rocksdb/db.h... yes
checking for main() in -lrocksdb... no
can't find header or library of rocksdb
*** 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.

Any hints?

maasha commented 10 years ago

Gotit:

export CPATH="$CPATH:<..>/rocksdb-rocksdb-3.5/include"
export LIBRARY_PATH="$LIBRARY_PATH:<..>/rocksdb-rocksdb-3.5"