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

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
A90204c955db033cd975f7bb0ec9600b?d=identicon&s=25 Ashley Moran (Guest)
on 2006-03-25 00: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
`connect'
         from /opt/local/lib/ruby/vendor_ruby/1.8/dbi/dbi.rb:384:in
`connect'
         from (irb):3

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

thanks
Ashley
This topic is locked and can not be replied to.