Try this gem out, works for me I think your on the right path...
http://github.com/rails-sqlserver/2000-2005-adapter/tree/master

On Tue, Apr 14, 2009 at 12:29 PM, mvargo <mfva...@gmail.com> wrote:

>
> I have followed the cookbook on
> http://wiki.rubyonrails.org/database-support/ms-sql
> but am having problems with the rails part.  I can connect to the
> database using sqsh so I think all the freetds plumbing is good.  When
> I try to connect to the db with a rake db:migrate or just using script/
> console I get this error:
>
> >> Client.find(:first)
> DBI::InterfaceError: Unable to load driver 'ODBC'
>        from /usr/lib/ruby/gems/1.8/gems/dbi-0.4.0/lib/dbi.rb:286:in
> `load_driver'
>        from /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
>        from /usr/lib/ruby/gems/1.8/gems/dbi-0.4.0/lib/dbi.rb:236:in
> `load_driver'
>        from /usr/lib/ruby/gems/1.8/gems/dbi-0.4.0/lib/dbi.rb:154:in
> `_get_full_driver'
>        from /usr/lib/ruby/gems/1.8/gems/dbi-0.4.0/lib/dbi.rb:139:in
> `connect'
>        from /usr/lib/ruby/gems/1.8/gems/activerecord-sqlserver-
> adapter-1.0.0.9250/lib/active_record/connection_adapters/
> sqlserver_adapter.rb:47:in `sqlserver_connection'
>        from
> /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/
> connection_adapters/abstract/connection_pool.rb:223:in `send'
>        from
> /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/
> connection_adapters/abstract/connection_pool.rb:223:in
> `new_connection'
>
> database.yml  is:
>
> development:
>    adapter: sqlserver
>    mode: ODBC
>    dsn: CONTENT_STORE
>    username: joebob
>    password: secret
>
> So I looked into dbi.rb and I see where it throws the exception.  It
> can't seem to get the Driver called ODBC.  I do have dbd-odbc-0.2.4
> installed.  Seems like the dbi part is not connecting to the odbc
> part.
>
> Rails is running on ubuntu 8.1.
>
> Any pointers would be very welcome.
>
> Sincerely,
>
> Mike Vargo
>
> *** LOCAL GEMS ***
>
> actionmailer (2.3.2)
> actionpack (2.3.2)
> activerecord (2.3.2)
> activerecord-sqlserver-adapter (1.0.0.9250)
> activeresource (2.3.2)
> activesupport (2.3.2)
> capistrano (2.5.5)
> cgi_multipart_eof_fix (2.5.0)
> daemons (1.0.10)
> dbd-odbc (0.2.4)
> dbi (0.4.0)
> deprecated (2.0.1)
> fastthread (1.0.7)
> gem_plugin (0.2.3)
> highline (1.5.0)
> linecache (0.43)
> mongrel (1.1.5)
> net-scp (1.0.2)
> net-sftp (2.0.2)
> net-ssh (2.0.11)
> net-ssh-gateway (1.0.1)
> rails (2.3.2)
> rake (0.8.4)
> ruby-debug-base (0.10.3)
> ruby-debug-ide (0.4.5)
> rubygems-update (1.3.1)
> sqlite3-ruby (1.2.4)
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to