Unsupported Microsoft SQL Azure Version Error
Microsoft recently changed the version string in their SQL Azure product to "Microsoft SQL Azure (RTM) - 11.0.2224.11 Jan 4 2013 16:38:21 Copyright (c) Microsoft Corporation". This is causing the ActiveRecord adapter to fail with a NotImplementedError.
Adding 2013 to the list of supported versions would resolve the problem, but it seems to me that the version year check isn't really relevant for Azure. It would be unfortunate to have to fix this same problem every year as they update their build string.
It appears that the@@version string for both Azure and SQL Server contains an actual build number that could be used to identify the versions. It looks as if the supported versions should be 9, 10, and 11 by this standard.
Would you be open to a patch that checks the version number rather than the product name?
I would be very open to that.
I have an application running on Azure right now and it just died with the error mentioned above. Is there something I can do to "patch" the application for now? It's rather important....
Never mind. I grabbed the fork from subakva.
Another approach that seems to work for me (on rails 3) is to monkey patch with the following initializer script:
# config/initializers/add_2013_to_sql_server_adapter.rb
ActiveRecord::ConnectionAdapters::SQLServerAdapter::SUPPORTED_VERSIONS << 2013
as per #180. At least till 2013 is supported officially.
The new version out later today will fix this. The year may still be wrong, but Azure will work. Pull requests for persnickety proper year would be great.