Connecting to SQL server on Mac OS X

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:inconnect’
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 forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs