freetdstiny-tds

Error installing TinyTDS on OSX 10.6 via gem install tiny_tds


I have been trying to install the TinyTDS gem on a Macbook with OSX 10.6. I was successful in installing Free TDS -- confirmed that it works via:

tsql -H SERVER -p 1433 -U username.

The error I'm getting from gem install tiny_tds is:

Building native extensions.  This could take a while...
ERROR:  Error installing tiny_tds:
    ERROR: Failed to build gem native extension.

        /Users/jason/.rvm/rubies/ruby-1.9.3-p194/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
-----
freetds is missing.
-----
*** 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.

I've tried specifying the TDS lib and include dirs (/usr/local/lib and /usr/local/include) without luck. I've tried reinstalling FreeTDS from source manually as well as via homebrew, but that made no difference.

I've seen a few similar issues posted, but they seem to reference an issue with locating iconv libraries which I appear to be moving beyond.

Any suggestions or references I may have overlooked? Thanks in advance.


Solution

  • Same problem on Ubuntu 14.04 resolved with:

    sudo apt-get install freetds-dev
    
    gem install tiny_tds
    

    Log output:

    Building native extensions.  This could take a while...
    /home/david/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/ext/builder.rb:73: warning: Insecure world writable dir /mnt/datapart/david in PATH, mode 040777
    Successfully installed tiny_tds-0.6.1
    Parsing documentation for tiny_tds-0.6.1
    Installing ri documentation for tiny_tds-0.6.1
    Done installing documentation for tiny_tds after 0 seconds
    1 gem installed