it's my first time trying to get a rails app to connect to an external database.
I've installed active-record-sql-server-adapter and Tiny_Tds successfully and in the rails console I am able to connect to the database just fine.
when I try to connect from the actual application however (run migrations, pull data, etc.) I get this error:
Tiny_Tds::Error: Adaptive Server connection failed (localhost)
Please help
In the error you received it mentions
localhost, and that is the host you've got configured indatabase.ymlas well. Should instead be your Azure server host name, something ending in "database.windows.net".There is also a reference to a sqlite database file that can be removed -- pull out the line
database: db/development.sqlite3. And instead ofuser:it should beusername:. Putting all of that together, try something like this:More info about configuring an Azure connection is described in the docs from the rails gem The Brick.