Skip to content

Platform Installation Mac

metaskills edited this page Sep 13, 2010 · 6 revisions

MacPorts 1.8/1.9 [tested]

The method for getting the SQL Server stack on Mac OS X is pretty much the same no matter which OS version you have. This article covers some of the finer points of Snow Leopard and x86_64 compatibility but can be applied to pretty much any version that MacPorts targets.

The Ultimate OS X Snow Leopard Stack For Rails Development:
x86_64, MacPorts, Ruby 1.8/1.9, SQL Server & More

MacPorts Base w/REE (Ruby Enterprise Edition) [tested]

Recently, I have built on the article above and written another on how to use Ruby Enterprise Edition with the SQL Server stack. The title is Installing REE With The Snow Leopard SQL Server Stack

Mac’s Native w/Custom unixODBC [untested]

Although untested and not for the faint of heart, if you want to use the Mac’s installed ruby with a custom version of unixODBC (perhaps installed into /usr/local) then Jacob Riff has written up his process for getting the stack up in Snow Leopard under this scenario. This also avoids the segfaults that iODBC causes.

Using ruby-odbc with unixODBC on Snow Leopard

Mac’s Native w/iODBC [tested]

Using the built in iODBC with Mac OS 10.6.0 will cause a segmentation fault with FreeTDS. A patch is available at iODBC.org

This package contains a bug-fix for the version of iODBC provided by Apple, installing in /usr; this is recommend for compiling interfaces such as Perl DBD::ODBC, the Ruby ODBC bridge and PHP: Mac OS X (10.5 Leopard, 10.6 Snow Leopard) iodbc-usr-sdk.zip

penwellr: I installed FreeTDS on 10.6 with the above patch using MacPorts. After that I was able to establish a connection using a DSNless string such as the following settings:

production:
  adapter: sqlserver
  mode: :ODBC
  username: sa
  password: password_goes_here
  database: database_goes_here
  dsn: DRIVER=/opt/local/lib/libtdsodbc.so;SERVER=server_goes_here;DATABASE=database_goes_here;UID=sa;PWD=password_goes_here

Homebrew All The Way w/unixODBC [untested]

Hugh Evans wrote a simple article that details how far HomeBrew has come and possibly how simple it is to use now for the adapter.

Homebrew, FreeTDS and RubyODBC

Making Sure Your LOCALE setting is UTF-8

Jon Kinney wrote this article on making sure your local settings are correct for the FreeTDS connection to SQL Server.

Change locale on os x snow leopard for FreeTDS functionality

Clone this wiki locally