Topic: ActiveRecord::ConnectionNotEstablished for SQL Server 2008 connection
Hello, I'm new to the Rails community and I'm trying to figure out how to connect to a SQL Server database. Everything I knew up to this point has been ASP.NET, so this is quite different.
Anyway, I think I've configured my database.yml file correctly, and I've created a login with the correct username and password. I have set up the scaffolding and placed my User.rb model in the models directory. I believe I am doing everything correctly, but I just can't seem to make it work.
Can anyone help? Thank you.
database.yml
development:
adapter: sqlserver
database: gsbridge
dataserver: localhost\SQLEXPRESS
username: gsbridge
password: yrahcaz
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
#test:
# adapter: sqlite3
# database: db/test.sqlite3
# pool: 5
# timeout: 5000
#
#production:
# adapter: sqlite3
# database: db/production.sqlite3
# pool: 5
# timeout: 5000models\User.rb
class User < ActiveRecord::Base
set_primary_key "ID"
end