There is a bug in the activerecord-sqlserver-adapter-2.2.21 gem. The error is in:
activerecord-sqlserver-adapter-2.2.21\lib\active_record \connection_adapters\sqlserver_adapter.rd
And is at line 1058.
FROM #{db_name}INFORMATION_SCHEMA.COLUMNS columns
should be
FROM #{db_name}.INFORMATION_SCHEMA.COLUMNS columns
If the period between the db_name and INFORMATION_SCHEMA is missed out, the database name gets appended to INFORMATION_SCHEMA. For example, if the database name is 'database_one', you will get an error:
Invalid object name 'database_oneINFORMATION_SCHEMA.COLUMNS' when you enter a connection.select.