Forum: Ruby on Rails Connecting to SQL server on Mac OS X

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Ashley M. (Guest)
on 2006-03-25 01:09
(Received via mailing list)
I've had this problem before on FreeBSD - I fixed it (or worked
around it) somehow but I can't remember how.  Also it's off the
Google radar but I can't believe I'm the only person to experience it

I've installed FreeTDS and unixODBC from DarwinPorts, along with rb-
odbc and rb-dbi.  I can connect to my SQL Server from tsql, but
ActiveRecord won't connect, and from in irb I get this error:

irb(main):003:0> dbh = DBI.connect('dbi:ODBC:MYDSN','MYUSER','MYPASS')
NoMethodError: undefined method `default_attributes' for
#<ODBC::Driver:0x485a24 @attrs={}, @name=nil>
         from /opt/local/lib/ruby/vendor_ruby/1.8/dbi/dbi.rb:580:in
         from /opt/local/lib/ruby/vendor_ruby/1.8/dbi/dbi.rb:384:in
         from (irb):3

Can anyone help?  After 3 hours now I'm going crazy trying to
remember what I'm not doing :-S

This topic is locked and can not be replied to.