Sql Server 2005

I’m trying to follow the “rolling with ruby on rails”
(http://shrinkster.com/hrp) tutorial, but want to get it working with
SQL server express instead of mysql.

I did all of the recommended steps I cound find:

I copied ado.rb to X:/ruby/lib/ruby/site_ruby/1.8/DBD/ADO/ADO.rb

I reworked by database.yml file to point to the new database:

development:
adapter: sqlserver
database: cookbook
host: DBI:ADO:Provider=SQLOLEDB;Data
Source=localhost\sqlexpress;Initial Catalog=cookbook;integrated
security=sspi

I have rails 1.1 which I just installed today (8/27/06)

When I try to access a page that should connect to this database, I get
an exeption with the following (abbreviated) stack trace that suggests
that mysql.rb is being used instead of ado.rb

Any help would be greatly appreciated.

John

c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/vendor/mysql.rb:108:in
initialize' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/vendor/mysql.rb:108:in real_connect’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/mysql_adapter.rb:330:in
connect' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/mysql_adapter.rb:87:in initialize’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/mysql_adapter.rb:36:in
mysql_connection' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/abstract/connection_specification.rb:251:in connection_without_query_cache=’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/query_cache.rb:54:in
`connection=’

unknown wrote:

I’m trying to follow the “rolling with ruby on rails”
(http://shrinkster.com/hrp) tutorial, but want to get it working with
SQL server express instead of mysql.

I did all of the recommended steps I cound find:

I copied ado.rb to X:/ruby/lib/ruby/site_ruby/1.8/DBD/ADO/ADO.rb

I reworked by database.yml file to point to the new database:

development:
adapter: sqlserver
database: cookbook
host: DBI:ADO:Provider=SQLOLEDB;Data
Source=localhost\sqlexpress;Initial Catalog=cookbook;integrated
security=sspi

I have rails 1.1 which I just installed today (8/27/06)

When I try to access a page that should connect to this database, I get
an exeption with the following (abbreviated) stack trace that suggests
that mysql.rb is being used instead of ado.rb

Any help would be greatly appreciated.

I had a similar problem, albeit not with Ruby on Rails.

Run the setup to use ADO:

ruby setup.rb config --with=dbi, dbd_ado
ruby setup.rb setup
ruby setup.rb install