Stuck: SQL Server + Rails + Mac OS X
I am having an insanely tough time getting Rails to connect to SQL Server on a Mac.
I have set up a DSN using Actual SQL Server drivers: http://www.actualtech.com/ - it works great. I can test it and it seems to be functioning.
However, when I run:
iodbctest "dsn=rails_import2;uid=sa;pwd=mypassword"
The output is:
1: SQLDriverConnect = [Actual][SQL Server] Unable to connect to data source (0) SQLSTATE=S1000
1: ODBC_Connect = [Actual][SQL Server] Unable to connect to data source (0) SQLSTATE=S1000
I have been banging my head against the wall on this fo开发者_开发问答r hours. I have tried a lot of things and had it working at one point with FreeTDS +MSSQL (http://blog.opensteam.net/past/2009/1/28/rails_ms_sql_on_mac/), but it broke after a restart.
Any ideas?
So after a few days of mind-numbing experimentation, I've determined that I've somehow hosed my FreeTDS install. Not sure how, but I've basically given up on using the activerecord-sqlserver-adapter gem from my Mac.
The good news? The instructions here at http://odbc-rails.rubyforge.org/ work great. Oh, and you'll also need the activerecord-odbc-adapter gem.
精彩评论