development:
adapter: sqlserver
mode: odbc
dns: Provider=SQLOLEDB;Data Source=MACHINENAME\SQLEXPRESS;UID=xxxx;PWD=xxxxx;Application Name=atlas
timeout: 5000
Now when I try to run script/console (or server or whatever) I get this error:
/var/lib/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:440:in `load_missing_constant':NameError: uninitialized constant ActiveRecord::WrappedDatabaseException
I've tried googling and changing settings back and forth but i've come up blank. Am I doing something awfully wrong or what?
BR,
SGI can only speak for using Rails 3.0.3 with SQLServer 2005, so I hope that helps you a bit.
I've added this to my Gemfile
:
gem 'ruby-odbc', '0.99991', :require => 'odbc'
gem 'activerecord-sqlserver-adapter', :branch => "arel2",
:git => "git://github.com/rails-sqlserver/activerecord-sqlserver-adapter"
And use this in my config/database.yml
:
test:
adapter: sqlserver
mode: ODBC
dsn: my_app_test
username: [USERNAME]
password: [PASSWORD]
The DSN is configured elsewhere, but it is in nowhere as complex as yours. I followed these instructions: http://github.com/rails-sqlserver/activerecord-sqlserver-adapter/wiki/Platform-Installation---Ubuntu
精彩评论