The Error
$ sudo gem install tiny_tds
Building native extensions. This could take a while...
ERROR: Error installing tiny_tds:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for iconv_open() in iconv.h... no
checking for iconv_open() in -liconv... yes
checking for sybfront.h... yes
checking for sybdb.h... yes
checking for tdsdbopen() in -lsybdb... no
HomeBrew
The above error occurs even after a
$ brew install freetds
Manual Installation
$ tar zxf freetds-stable.tgz
$ cd freetds-0.91
$ ./configure
$ make
$ sudo make install
It appears to be missing the following file in /usr/local/lib/
:
libsybdb.so
Instead I have the following files:
libsybdb.a
libsybdb.dylib
libsybdb.la
Solution
This was resolved by simply adding
/opt/chef/embedded/bin
to my$PATH
File Contents after change
Update
$PATH
Install the gem (Make sure you've install
freetds
using one of the above methods)SPECIAL NOTE: This assumes you've installed the chef
Reference:
Apparently the command to install is below:
I solved this problem by explicitly specifying the 64 bit architecture:
The reason is that during the gem building process, mkmf will try to look for 32 bit version of freetds, which is not available. The error message in
mkmf.log
said: