ruby-on-railssql-serverrubydatabasetiny-tds

I am having trouble connecting a MSSQL database to my rails app


I am attempting to connect a clients database to a rails app I am developing for them. They are using MSSQL for their database. I am able to connect to it thanks to Tiny-tds but when I run rake:db migrate I get the following message:

TinyTds::Error: Database 'MSSQL' does not exist. Make sure that the name is entered correctly.

The database does exist.

Here is what I have in my database.yml:

development:
    adapter: sqlserver
    host: *.*.*.*.*
    port: 1433
    database: MSSQL
    username: username
    password: not the real password

Does anyone have an idea as to why it doesn't recognize that the database exists?


Solution

  • The database field in the configuration is the name of the logical database that you are connecting to. This error means that there is no logical database named 'MSSQL' for the given connection.