I can't get the notmuch ruby bindings to work on Mac OS (El Capitan). So far, I've tried:
Homebrew
But ruby -e "require 'notmuch'"
fails.
per the README
$ git clone --branch=0.15.2 git://notmuchmail.org/git/notmuch ~/notmuch
$ cd ~/notmuch
$ make build notmuch=~/notmuch
...
make: *** No rule to make target `build'. Stop.
Naturally, ruby -e "require 'notmuch'"
still fails.
Current git master
$ git clone git://notmuchmail.org/git/notmuch
Per bindings/ruby/README
:
To build the the notmuch ruby extension, run the following commands
from the top level notmuch source directory:
% ./configure
% make ruby-bindings
The generic documentation about building notmuch also applies.
./configure
fails on dependency zlib >=1.2.5.2 (system is 1.2.5). So, I installed 1.2.8 via rudix.
Now ./configure
and make ruby-bindings
succeed, but ruby -e "require 'notmuch'"
still fails.
Ruby Bindings
Go to notmuch source code, and then 'bindings/ruby':
% ruby extconf.rb
% make
% sudo make install
$ cd bindings/ruby
$ make install
/usr/bin/install -c -m 0755 notmuch.bundle /Users/rlue/.rbenv/versions/2.4.0/lib/ruby/vendor_ruby/2.4.0/x86_64-darwin15
Now ruby -e "require 'notmuch'"
throws a different error:
/Users/rlue/.rbenv/versions/2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require': dlopen(/Users/rlue/.rbenv/versions/2.4.0/lib/ruby/vendor_ruby/2.4.0/x86_64-darwin15/notmuch.bundle, 9): Library not loaded: /usr/local/lib/libnotmuch.5.dylib (LoadError)
Referenced from: /Users/rlue/.rbenv/versions/2.4.0/lib/ruby/vendor_ruby/2.4.0/x86_64-darwin15/notmuch.bundle
Reason: image not found - /Users/rlue/.rbenv/versions/2.4.0/lib/ruby/vendor_ruby/2.4.0/x86_64-darwin15/notmuch.bundle
from /Users/rlue/.rbenv/versions/2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
It appears it's trying to load /usr/local/lib/libnotmuch.5.dylib
, which does not exist:
$ ls /usr/local/lib/libnotmuch.*
/usr/local/lib/libnotmuch.4.4.0.dylib
/usr/local/lib/libnotmuch.4.dylib
/usr/local/lib/libnotmuch.dylib
Any suggestions?