title: ROR FreeTDS install failure on OSX
body: <p>Good afternoon, I am trying to utilize a MS SQL Server DB with Ruby on Rails.  Based on my research, I've installed FreeTDS and unixodbc before proceeding to add it to my Rails project.  I've tested my install and connected/queried any of many MSSQL databases without issue:</p>
  
  <pre><code>$ sqsh -S &lt;servername&gt; -U &lt;username&gt;
  sqsh-2.5.16.1 Copyright (C) 1995-2001 Scott C. Gray
  Portions Copyright (C) 2004-2014 Michael Peppler and Martin Wesdorp
  This is free software with ABSOLUTELY NO WARRANTY
  For more information type '\warranty'
  Password: 
  [4] &lt;server&gt;.master.1&gt; use &lt;DBNAME&gt;;
  [5] &lt;server&gt;.&lt;DBNAME&gt;.1&gt; select top 5 * from &lt;tablename&gt;;
  </code></pre>
  
  <p>.. results follow ..  </p>
  
  <p>After a successful run of tests, I decided to try and bundle install for my new Rails app.  I modified the gemfile:</p>
  
  <pre><code>source 'https://rubygems.org'
  
  # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
  gem 'rails', '4.2.0'
  # Use MS SQL Server as the database for Active Record
  # and default connection through tiny_tds default connection mode
  gem 'tiny_tds'
  gem 'activerecord-sqlserver-adapter'
  ...
  </code></pre>
  
  <p>When I run bundle install, I get the following error:</p>
  
  <pre><code>Gem::Installer::ExtensionBuildError: 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
  -----
  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.
  
  Provided configuration options:
      --with-opt-dir
      --without-opt-dir
      --with-opt-include
      --without-opt-include=${opt-dir}/include
      --with-opt-lib
      --without-opt-lib=${opt-dir}/lib
      --with-make-prog
      --without-make-prog
      --srcdir=.
      --curdir
      --ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
      --enable-lookup
      --disable-lookup
      --with-iconv-dir
      --without-iconv-dir
      --with-iconv-include
      --without-iconv-include=${iconv-dir}/include
      --with-iconv-lib
      --without-iconv-lib=${iconv-dir}/
      --with-freetds-dir
      --without-freetds-dir
      --with-freetds-include
      --without-freetds-include=${freetds-dir}/include
      --with-freetds-lib
      --without-freetds-lib=${freetds-dir}/
      --with-iconvlib
      --without-iconvlib
      --with-sybdblib
      --without-sybdblib
  
  
  Gem files will remain installed in /var/folders/vh/3f8srsrs57zbk6p7vg7fg6pw0000gn/T/bundler20150319-18359-ed8ld7/tiny_tds-0.6.2/gems/tiny_tds-0.6.2 for inspection.
  Results logged to /var/folders/vh/3f8srsrs57zbk6p7vg7fg6pw0000gn/T/bundler20150319-18359-ed8ld7/tiny_tds-0.6.2/gems/tiny_tds-0.6.2/ext/tiny_tds/gem_make.out
  An error occurred while installing tiny_tds (0.6.2), and Bundler cannot continue.
  Make sure that `gem install tiny_tds -v '0.6.2'` succeeds before bundling.
  </code></pre>
  
  <p>I've read through other related posts on SO including <a href="https://stackoverflow.com/questions/7525109/ror-unable-to-install-tiny-tds">ROR + Unable to install tiny_tds</a>, however, those answers only reflect generic answers pointing to work that I've already validated.  I found a build/config flag reference for FreeTDS <a href="http://cubist.cs.washington.edu/doc/FreeTDS/faq.html" rel="nofollow noreferrer">here</a>:</p>
  
  <blockquote>
    <p>--enable-dbmfix:  rename dbopen() to tdsdbopen() as a work around for dbm name conflict</p>
  </blockquote>
  
  <p>So, my ultimate question is whether anybody can tell me whether this can be done in config file somewhere or that I have to build my own version of FreeTDS to solve this? </p>