I’ve been trying to get my rails program to access an existing sql express server set up on another machine at work. I’ve followed these instructions: GitHub and set up my database.yml like this:
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,
SG
I 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:And use this in my
config/database.yml: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