[ruby-dbi-users] Error using dbd-odbc with SQL Server on OS X 10.5.5

doug livesey biot023 at gmail.com
Mon Dec 22 05:32:57 EST 2008


Hi, I've tried that & got a fresh error, which is progress!I'll post the
error here in case it rings any bells, but I think it's telling me there's a
subtle error somewhere in my FreeTDS or iODBC setup. I can connect using
TSQL, but I'm using what I think is the server DSN in the successful
connection string, not a database name, so I guess that's my first port of
call.
& thanks very much for your help -- the output is below.
   Doug.

DBI::DatabaseError: IM002 (0) [unixODBC][Driver Manager]Data source name not
found, and no default driver specified
from
/usr/local/lib/ruby/gems/1.8/gems/dbd-odbc-0.2.4/lib/dbd/odbc/driver.rb:36:in
`connect'
from
/usr/local/lib/ruby/gems/1.8/gems/dbi-0.4.1/lib/dbi/handles/driver.rb:33:in
`connect'
from /usr/local/lib/ruby/gems/1.8/gems/dbi-0.4.1/lib/dbi.rb:142:in `connect'
from
/usr/local/lib/ruby/gems/1.8/gems/activerecord-sqlserver-adapter-1.0.0/lib/active_record/connection_adapters/sqlserver_adapter.rb:46:in
`sqlserver_connection'
from
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in
`send'
from
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in
`new_connection'
from
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in
`checkout_new_connection'
from
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in
`checkout'
from
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in
`loop'
from
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in
`checkout'
from /usr/local/lib/ruby/1.8/monitor.rb:238:in `synchronize'
from
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in
`checkout'
from
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in
`connection'
from
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in
`retrieve_connection'
from
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:121:in
`retrieve_connection'
from
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:113:in
`connection'
from
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/base.rb:1214:in
`table_exists?'
from
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/base.rb:1353:in
`inspect'
from /usr/local/lib/ruby/1.8/irb.rb:298:in `output_value'
from /usr/local/lib/ruby/1.8/irb.rb:151:in `eval_input'
from /usr/local/lib/ruby/1.8/irb.rb:259:in `signal_status'
from /usr/local/lib/ruby/1.8/irb.rb:147:in `eval_input'
from /usr/local/lib/ruby/1.8/irb.rb:146:in `eval_input'
from /usr/local/lib/ruby/1.8/irb.rb:70:in `start'
from /usr/local/lib/ruby/1.8/irb.rb:69:in `catch'
from /usr/local/lib/ruby/1.8/irb.rb:69:in `start'
from /usr/local/bin/irb:13>>


2008/12/22 Erik Hollensbe <erik at hollensbe.org>

> On Mon, 2008-12-22 at 00:18 +0000, doug livesey wrote:
> > That reports back "0.2.0".
> > Full disclosure -- this isn't the first time I've tried to get this to
> > work, and previous attempts (when I first got my macbook) could have
> > left the system in any state. Having said that, I've reinstalled &
> > updated every gem I have since then.
>
> No worries. You probably used an 0.2.0 install via setup.rb.
>
> Ok, look back at the original stack trace you posted. Find the dbi.rb
> about 5 lines down (sorry, to lazy to dig this up). Delete it and the
> dbi and dbd directories in the same dir.
>
> After doing that, try your original attempt again.
>
> -Erik
>
> >
>
> _______________________________________________
> ruby-dbi-users mailing list
> ruby-dbi-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ruby-dbi-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ruby-dbi-users/attachments/20081222/a6b9a1b9/attachment-0001.html>


More information about the ruby-dbi-users mailing list