Yes, you need to install the ADO DBI adaptor. Following is from the
top of active_record\connection_adaptors\sqlserver_adaptor.rb
# sqlserver_adapter.rb -- ActiveRecord adapter for Microsoft SQL Server
#
# Author: Joey Gibson <joey-JZ7uTQG3sB7SUeElwK9/Pw@public.gmane.org>
# Date: 10/14/2004
#
# REQUIREMENTS:
#
# This adapter will ONLY work on Windows systems, since it relies on
Win32OLE, which,
# to my knowledge, is only available on Window.
#
# It relies on the ADO support in the DBI module. If you are using the
# one-click installer of Ruby, then you already have DBI installed, but
# the ADO module is *NOT* installed. You will need to get the latest
# source distribution of Ruby-DBI from http://ruby-dbi.sourceforge.net/
# unzip it, and copy the file src/lib/dbd_ado/ADO.rb to
# X:/Ruby/lib/ruby/site_ruby/1.8/DBD/ADO/ADO.rb (you will need to create
# the ADO directory). Once you''ve installed that file, you are ready to
go.
#
# This module uses the ADO-style DSNs for connection. For example:
# "DBI:ADO:Provider=SQLOLEDB;Data Source=(local);Initial
Catalog=test;User Id=sa;Password=password;"
# with User Id replaced with your proper login, and Password with your
# password.
#
# I have tested this code on a WindowsXP Pro SP1 system,
# ruby 1.8.2 (2004-07-29) [i386-mswin32], SQL Server 2000.
#
Cheers,
Chris
On Fri, 7 Jan 2005 00:23:26 -0500, Sam Stearns
<sam.stearns-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hi All-
>
> This is my first post. I''ve been following the list for a couple
> weeks, and have done the todo list tutorial on my iBook at home. This
> is great stuff!
>
> Today I set up rails at work on an XP/SQL Server/Apache setup, in
> order to try and whip up a simple project-tracking tool for my boss.
> The setup was pretty smooth until I ran scaffold, and got a DBI
> TypeError (see framework trace below)
>
> I googled the error message, and found a post
>
<http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/118133?help-en>
> that indicated that i might need to install a driver to connect to
> sqlserver, like Ruby/DB2.
>
> Is there such a driver that needs to be installed separately? Or does
> the error look more like I''ve got my sqlserver setup wrong (bad
login,
> client network utility alias, etc.)
>
> Thanks!
> -Sam
>
> Here is the trace of the error message
> ==========> Error Message:
> TypeError in Project#index
>
> is not a class/module
> Show framework trace
>
> c:/ruby/lib/ruby/site_ruby/1.8/dbi/dbi.rb:499:in `load_driver''
> c:/ruby/lib/ruby/site_ruby/1.8/dbi/dbi.rb:401:in
`_get_full_driver''
> c:/ruby/lib/ruby/site_ruby/1.8/dbi/dbi.rb:381:in `connect''
>
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.4.0/lib/active_record/connection_adapters/sqlserver_adapter.rb:46:in
> `sqlserver_connection''
>
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.4.0/lib/active_record/connection_adapters/abstract_adapter.rb:148:in
> `send''
>
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.4.0/lib/active_record/connection_adapters/abstract_adapter.rb:148:in
> `connection=''
>
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.4.0/lib/active_record/connection_adapters/abstract_adapter.rb:112:in
> `retrieve_connection''
>
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.4.0/lib/active_record/base.rb:196:in
> `connection''
>
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.4.0/lib/active_record/base.rb:328:in
> `find_by_sql''
>
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.4.0/lib/active_record/base.rb:321:in
> `find_all''
>
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.2.0/lib/action_controller/scaffolding.rb:103:in
> `list''
>
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.2.0/lib/action_controller/scaffolding.rb:96:in
> `index''
>
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.2.0/lib/action_controller/base.rb:588:in
> `send''
>
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.2.0/lib/action_controller/base.rb:588:in
> `perform_action_without_filters''
>
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.2.0/lib/action_controller/filters.rb:236:in
> `perform_action_without_benchmark''
>
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.2.0/lib/action_controller/benchmarking.rb:30:in
> `perform_action_without_rescue''
>
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.2.0/lib/action_controller/benchmarking.rb:30:in
> `measure''
>
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.2.0/lib/action_controller/benchmarking.rb:30:in
> `perform_action_without_rescue''
>
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.2.0/lib/action_controller/rescue.rb:75:in
> `perform_action''
>
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.2.0/lib/action_controller/base.rb:263:in
> `send''
>
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.2.0/lib/action_controller/base.rb:263:in
> `process''
>
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.2.0/lib/action_controller/base.rb:241:in
> `process''
> c:/ruby/lib/ruby/gems/1.8/gems/rails-0.9.3/lib/dispatcher.rb:39:in
`dispatch''
> c:/rails/PROJEC~1/public/dispatch.cgi:10
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>