Closed fpauser closed 12 years ago
Hmmm, there is not a lot that can go wrong here. Perhaps your Gemfile is not requiring the adapter gem or you have some other setup where it is lazily loaded? If so, try putting a `require 'activerecord-sqlserver-adapter`` at the top of that initializer file.
BTW, I have a #user_options
method in the adapter you can use.
https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/blob/master/lib/active_record/connection_adapters/sqlserver/database_statements.rb#L132
Closing this unless needed, I know of quite a few other people that are using this hook. So I have to assume that you are doing something a bit different in your gem requires or something, hence my suggestion for the top level require. Please let me know if this is still not working for you and/or what you have found out. I will re-open if needed.
My setting: Linux, TinyTDS-0.91, Ruby-1.9.3, Rails-3.2.6
I added the following initializer to configure my connection to the db (config/initializers/sqlserver.rb):
But
configure_connection
is never getting called - my log just prints "Connection settings...".Checking the current connection settings in rails console via
ActiveRecord::Base.connection.exec_query "DBCC USEROPTIONS"
also confirms that there were no custom connection settings set:Tried with latest master and version 3.2.5.