From: Aaron Patterson Date: 2009-07-05T04:59:37+09:00 Subject: Re: nfc 1.0.0 Released On Sat, Jul 04, 2009 at 07:30:05PM +0900, Reverend Ted wrote: > On Jul 4, 9:25�am, Aaron Patterson wrote: > > Make sure to read the section under INSTALL: > > > > �http://github.com/tenderlove/nfc/tree/master > > > > You need to have libnfc installed, and make sure that the dylib (or so) > > is in your LD_LIBRARY_PATH. > > > Aaron: > Thanks for the reply. That gave me enough to get there. > > I document the solution for anyone coming along looking for it: > > MacOS uses a different environment setting from LD_LIBRARY_PATH. > Instead it uses DYLD_LIBRARY_PATH. (Try 'man dyld' at the command line > to learn more about this.) > > To enable the nfc gem to find libnfc, you must 'export > DYLD_LIBRARY_PATH=/path/to/libnfc-1.1.0:$DYLD_LIBRARY_PATH' Hrm. ffi uses dlopen for loading the dynamic library. The man page for dlopen under the searching section indicates that it searches LD_LIBRARY_PATH, DYLD_LIBRARY_PATH, then DYLD_FALLBACK_LIBRARY_PATH. So either *should* work (though I haven't tried). > That makes it work for a given Terminal session. You can add the same > command to your ~/.profile file. > > Thanks both to you and Ryan for the quick replies. No problem! > Aaron: mail me at ted /at/ touchatag so I can send you a thank you > gift. Sent. Thank you! :-) -- Aaron Patterson http://tenderlovemaking.com/