From makarand.km at gmail.com Mon Dec 1 01:19:11 2008 From: makarand.km at gmail.com (Makarand Maslekar) Date: Mon, 1 Dec 2008 11:49:11 +0530 Subject: [ruby-dbi-users] Mysql Driver Load error Message-ID: Hi Erik, I have tried your suggestions but that did not worked..so i have tried following thing i have put the gem 'dbi' line and then tried to connect to the mysql and it worked so i am just wondering do i need to put gem 'dbi' line when i will using the dbi? gem 'dbi' require 'dbi' #gem 'dbd-mysql' begin # connect to the MySQL server dbh = DBI.connect("DBI:Mysql:test:localhost", "xyz","xxxxx") # get server version string and display it row = dbh.select_one("SELECT VERSION()") puts "Server version: " + row[0] rescue DBI::DatabaseError => e puts "An error occurred" puts "Error code: #{e.err}" puts "Error message: #{e.errstr}" ensure # disconnect from server dbh.disconnect if dbh end -------------- next part -------------- An HTML attachment was scrubbed... URL: From erik at hollensbe.org Mon Dec 1 10:17:12 2008 From: erik at hollensbe.org (Erik Hollensbe) Date: Mon, 01 Dec 2008 07:17:12 -0800 Subject: [ruby-dbi-users] Mysql Driver Load error In-Reply-To: References: Message-ID: <4933FFF8.8050507@hollensbe.org> Makarand Maslekar wrote: > Hi Erik, > > I have tried your suggestions but that did not worked..so i have tried > following thing > i have put the gem 'dbi' line and then tried to connect to the mysql > and it worked so i am just wondering do i need to put gem 'dbi' line > when i will using the dbi? The error you gave me before suggests that DBI was already being loaded, I'm not sure why that would make a difference. What error do you get with the original code against DBI 0.4.1? -Erik From biot023 at gmail.com Sun Dec 21 12:13:15 2008 From: biot023 at gmail.com (doug livesey) Date: Sun, 21 Dec 2008 17:13:15 +0000 Subject: [ruby-dbi-users] Error using dbd-odbc with SQL Server on OS X 10.5.5 Message-ID: <50873a360812210913r41f87a46pfc86503e05512eda@mail.gmail.com> Hi -- I'm getting this error after I've battled to get my rails app to connect to SQL Server: /usr/local/lib/ruby/gems/1.8/gems/dbd-odbc-0.2.4/lib/dbd/ODBC.rb:57: warning: already initialized constant VERSION /usr/local/lib/ruby/gems/1.8/gems/dbd-odbc-0.2.4/lib/dbd/ODBC.rb:58: warning: already initialized constant DESCRIPTION DBI::InterfaceError: Could not load driver (uninitialized constant DBI::TypeUtil) from /usr/local/lib/ruby/site_ruby/1.8/dbi.rb:368:in `load_driver' from /usr/local/lib/ruby/site_ruby/1.8/dbi.rb:233:in `_get_full_driver' from /usr/local/lib/ruby/site_ruby/1.8/dbi.rb:219: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>> exit Can anyone advise me as to where I should be looking to fix this? I'm well out of my comfort zone! Cheers, Doug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From erik at hollensbe.org Sun Dec 21 12:52:45 2008 From: erik at hollensbe.org (Erik Hollensbe) Date: Sun, 21 Dec 2008 09:52:45 -0800 Subject: [ruby-dbi-users] Error using dbd-odbc with SQL Server on OS X 10.5.5 In-Reply-To: <50873a360812210913r41f87a46pfc86503e05512eda@mail.gmail.com> References: <50873a360812210913r41f87a46pfc86503e05512eda@mail.gmail.com> Message-ID: <1229881965.26604.0.camel@islay.home.hollensbe.org> On Sun, 2008-12-21 at 17:13 +0000, doug livesey wrote: > Hi -- I'm getting this error after I've battled to get my rails app to > connect to SQL Server: It looks like the odbc library is being required twice, but I'm not entirely certain. I can look at it later today. -Erik > From biot023 at gmail.com Sun Dec 21 14:33:12 2008 From: biot023 at gmail.com (doug livesey) Date: Sun, 21 Dec 2008 19:33:12 +0000 Subject: [ruby-dbi-users] Error using dbd-odbc with SQL Server on OS X 10.5.5 In-Reply-To: <1229881965.26604.0.camel@islay.home.hollensbe.org> References: <50873a360812210913r41f87a46pfc86503e05512eda@mail.gmail.com> <1229881965.26604.0.camel@islay.home.hollensbe.org> Message-ID: <50873a360812211133i43db5fb8r6623543fd630246f@mail.gmail.com> That would be fantastic, thankyou -- I'll keep checking my email in case you need me to post any files or config settings or anything.Cheers, Doug. 2008/12/21 Erik Hollensbe > On Sun, 2008-12-21 at 17:13 +0000, doug livesey wrote: > > Hi -- I'm getting this error after I've battled to get my rails app to > > connect to SQL Server: > > It looks like the odbc library is being required twice, but I'm not > entirely certain. I can look at it later today. > > -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: From erik at hollensbe.org Sun Dec 21 15:06:09 2008 From: erik at hollensbe.org (Erik Hollensbe) Date: Sun, 21 Dec 2008 12:06:09 -0800 Subject: [ruby-dbi-users] Error using dbd-odbc with SQL Server on OS X 10.5.5 In-Reply-To: <50873a360812211133i43db5fb8r6623543fd630246f@mail.gmail.com> References: <50873a360812210913r41f87a46pfc86503e05512eda@mail.gmail.com> <1229881965.26604.0.camel@islay.home.hollensbe.org> <50873a360812211133i43db5fb8r6623543fd630246f@mail.gmail.com> Message-ID: <1229889969.26604.6.camel@islay.home.hollensbe.org> On Sun, 2008-12-21 at 19:33 +0000, doug livesey wrote: > That would be fantastic, thankyou -- I'll keep checking my email in > case you need me to post any files or config settings or anything. > Cheers, > Doug. > Wait a sec.. it looks like DBI::TypeUtil isn't being loaded; What version of DBI do you have installed? -Erik > From biot023 at gmail.com Sun Dec 21 15:57:30 2008 From: biot023 at gmail.com (doug livesey) Date: Sun, 21 Dec 2008 20:57:30 +0000 Subject: [ruby-dbi-users] Error using dbd-odbc with SQL Server on OS X 10.5.5 In-Reply-To: <1229889969.26604.6.camel@islay.home.hollensbe.org> References: <50873a360812210913r41f87a46pfc86503e05512eda@mail.gmail.com> <1229881965.26604.0.camel@islay.home.hollensbe.org> <50873a360812211133i43db5fb8r6623543fd630246f@mail.gmail.com> <1229889969.26604.6.camel@islay.home.hollensbe.org> Message-ID: <50873a360812211257o56a51d7bh93714db83f579ae@mail.gmail.com> I just called "gem list dbi" and got back "dbi (0.4.1)". 2008/12/21 Erik Hollensbe > On Sun, 2008-12-21 at 19:33 +0000, doug livesey wrote: > > That would be fantastic, thankyou -- I'll keep checking my email in > > case you need me to post any files or config settings or anything. > > Cheers, > > Doug. > > > > Wait a sec.. it looks like DBI::TypeUtil isn't being loaded; > > What version of DBI do you have installed? > > -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: From erik at hollensbe.org Sun Dec 21 18:53:08 2008 From: erik at hollensbe.org (Erik Hollensbe) Date: Sun, 21 Dec 2008 15:53:08 -0800 Subject: [ruby-dbi-users] Error using dbd-odbc with SQL Server on OS X 10.5.5 In-Reply-To: <50873a360812211257o56a51d7bh93714db83f579ae@mail.gmail.com> References: <50873a360812210913r41f87a46pfc86503e05512eda@mail.gmail.com> <1229881965.26604.0.camel@islay.home.hollensbe.org> <50873a360812211133i43db5fb8r6623543fd630246f@mail.gmail.com> <1229889969.26604.6.camel@islay.home.hollensbe.org> <50873a360812211257o56a51d7bh93714db83f579ae@mail.gmail.com> Message-ID: <1229903588.26604.8.camel@islay.home.hollensbe.org> On Sun, 2008-12-21 at 20:57 +0000, doug livesey wrote: > I just called "gem list dbi" and got back "dbi (0.4.1)". Yes, which concerns me; the DBI you're loading is not from rubygems but the dbd-odbc is. What does ruby -rdbi -e 'p DBI::VERSION' result in? -Erik From biot023 at gmail.com Sun Dec 21 19:18:53 2008 From: biot023 at gmail.com (doug livesey) Date: Mon, 22 Dec 2008 00:18:53 +0000 Subject: [ruby-dbi-users] Error using dbd-odbc with SQL Server on OS X 10.5.5 In-Reply-To: <1229903588.26604.8.camel@islay.home.hollensbe.org> References: <50873a360812210913r41f87a46pfc86503e05512eda@mail.gmail.com> <1229881965.26604.0.camel@islay.home.hollensbe.org> <50873a360812211133i43db5fb8r6623543fd630246f@mail.gmail.com> <1229889969.26604.6.camel@islay.home.hollensbe.org> <50873a360812211257o56a51d7bh93714db83f579ae@mail.gmail.com> <1229903588.26604.8.camel@islay.home.hollensbe.org> Message-ID: <50873a360812211618q4e47cfa3ub1cbf8bad1e5960e@mail.gmail.com> 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. 2008/12/21 Erik Hollensbe > On Sun, 2008-12-21 at 20:57 +0000, doug livesey wrote: > > I just called "gem list dbi" and got back "dbi (0.4.1)". > Yes, which concerns me; the DBI you're loading is not from rubygems but > the dbd-odbc is. > > What does ruby -rdbi -e 'p DBI::VERSION' result in? > > -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: From erik at hollensbe.org Sun Dec 21 19:50:06 2008 From: erik at hollensbe.org (Erik Hollensbe) Date: Sun, 21 Dec 2008 16:50:06 -0800 Subject: [ruby-dbi-users] Error using dbd-odbc with SQL Server on OS X 10.5.5 In-Reply-To: <50873a360812211618q4e47cfa3ub1cbf8bad1e5960e@mail.gmail.com> References: <50873a360812210913r41f87a46pfc86503e05512eda@mail.gmail.com> <1229881965.26604.0.camel@islay.home.hollensbe.org> <50873a360812211133i43db5fb8r6623543fd630246f@mail.gmail.com> <1229889969.26604.6.camel@islay.home.hollensbe.org> <50873a360812211257o56a51d7bh93714db83f579ae@mail.gmail.com> <1229903588.26604.8.camel@islay.home.hollensbe.org> <50873a360812211618q4e47cfa3ub1cbf8bad1e5960e@mail.gmail.com> Message-ID: <1229907006.26604.11.camel@islay.home.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 > From biot023 at gmail.com Mon Dec 22 05:32:57 2008 From: biot023 at gmail.com (doug livesey) Date: Mon, 22 Dec 2008 10:32:57 +0000 Subject: [ruby-dbi-users] Error using dbd-odbc with SQL Server on OS X 10.5.5 In-Reply-To: <1229907006.26604.11.camel@islay.home.hollensbe.org> References: <50873a360812210913r41f87a46pfc86503e05512eda@mail.gmail.com> <1229881965.26604.0.camel@islay.home.hollensbe.org> <50873a360812211133i43db5fb8r6623543fd630246f@mail.gmail.com> <1229889969.26604.6.camel@islay.home.hollensbe.org> <50873a360812211257o56a51d7bh93714db83f579ae@mail.gmail.com> <1229903588.26604.8.camel@islay.home.hollensbe.org> <50873a360812211618q4e47cfa3ub1cbf8bad1e5960e@mail.gmail.com> <1229907006.26604.11.camel@islay.home.hollensbe.org> Message-ID: <50873a360812220232j6015b434y939c1c28d6e735d3@mail.gmail.com> 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 > 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: From biot023 at gmail.com Mon Dec 22 06:27:39 2008 From: biot023 at gmail.com (doug livesey) Date: Mon, 22 Dec 2008 11:27:39 +0000 Subject: [ruby-dbi-users] Error using dbd-odbc with SQL Server on OS X 10.5.5 In-Reply-To: <50873a360812220232j6015b434y939c1c28d6e735d3@mail.gmail.com> References: <50873a360812210913r41f87a46pfc86503e05512eda@mail.gmail.com> <1229881965.26604.0.camel@islay.home.hollensbe.org> <50873a360812211133i43db5fb8r6623543fd630246f@mail.gmail.com> <1229889969.26604.6.camel@islay.home.hollensbe.org> <50873a360812211257o56a51d7bh93714db83f579ae@mail.gmail.com> <1229903588.26604.8.camel@islay.home.hollensbe.org> <50873a360812211618q4e47cfa3ub1cbf8bad1e5960e@mail.gmail.com> <1229907006.26604.11.camel@islay.home.hollensbe.org> <50873a360812220232j6015b434y939c1c28d6e735d3@mail.gmail.com> Message-ID: <50873a360812220327j601040fdgb82cf103070fb6b4@mail.gmail.com> Further to that, I've been playing around, and cannot get it to connect. I'm pretty sure that FreeTDS is OK, as the tsql connection works fine, and I can connect & select databases & query them and everything. So maybe my problem is with iODBC, but I don't know how to test this, so am not sure. For completeness (and recognising that this could well be a problem with something other than ruby-dbi) I'll post my odbc config files -- if you spotted something amiss there, that would be great, but I well understand that this may be an odbc config problem, and so out of your purview. [ODBC Drivers] TDS = Installed [TDS] Description = FreeTDS Driver = /usr/local/lib/libtdsodbc.so Setup = /usr/local/lib/libtdsodbc.so [ODBC Data Sources] KYLIE = TDS [holly_test] Driver = TDS Description = Description of this database connection Trace = yes TraceFile = /tmp/odbc.log Servername = KYLIE Database = holly_test [holly_production] Driver = TDS Description = Description of this database connection Trace = yes TraceFile = /tmp/odbc.log Servername = KYLIE Database = holly_production [holly_production_old] Driver = /usr/local/lib/libtdsodbc.so Description = Description of this database connection Trace = yes TraceFile = /tmp/odbc.log Servername = KYLIE Database = holly_production My database.yml file contains this: production: database: holly_production adapter: sqlserver mode: odbc dsn: KYLIE username: holly password: ******** (I've also tried the DSN-less configuration with no better result.) And, finally, seeing as I've been changing things, here is a dump of the latest error I get when trying to connect in the rails console: 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 Cheers for any help you can offer, and for all offered thus far, and it's well understood if this falls outside of your remit. Doug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From erik at hollensbe.org Tue Dec 23 00:47:34 2008 From: erik at hollensbe.org (Erik Hollensbe) Date: Mon, 22 Dec 2008 21:47:34 -0800 Subject: [ruby-dbi-users] Error using dbd-odbc with SQL Server on OS X 10.5.5 In-Reply-To: <50873a360812220327j601040fdgb82cf103070fb6b4@mail.gmail.com> References: <50873a360812210913r41f87a46pfc86503e05512eda@mail.gmail.com> <1229881965.26604.0.camel@islay.home.hollensbe.org> <50873a360812211133i43db5fb8r6623543fd630246f@mail.gmail.com> <1229889969.26604.6.camel@islay.home.hollensbe.org> <50873a360812211257o56a51d7bh93714db83f579ae@mail.gmail.com> <1229903588.26604.8.camel@islay.home.hollensbe.org> <50873a360812211618q4e47cfa3ub1cbf8bad1e5960e@mail.gmail.com> <1229907006.26604.11.camel@islay.home.hollensbe.org> <50873a360812220232j6015b434y939c1c28d6e735d3@mail.gmail.com> <50873a360812220327j601040fdgb82cf103070fb6b4@mail.gmail.com> Message-ID: <1230011254.5884.1.camel@islay.home.hollensbe.org> On Mon, 2008-12-22 at 11:27 +0000, doug livesey wrote: > Further to that, I've been playing around, and cannot get it to > connect. I'm pretty sure that FreeTDS is OK, as the tsql connection > works fine, and I can connect & select databases & query them and > everything. I have had zero success with iODBC. Use unixodbc if you can. -Erik > From dcoleman at chariotsolutions.com Tue Dec 23 09:29:42 2008 From: dcoleman at chariotsolutions.com (Don Coleman) Date: Tue, 23 Dec 2008 09:29:42 -0500 Subject: [ruby-dbi-users] Error using dbd-odbc with SQL Server on OS X 10.5.5 In-Reply-To: <50873a360812220327j601040fdgb82cf103070fb6b4@mail.gmail.com> References: <50873a360812210913r41f87a46pfc86503e05512eda@mail.gmail.com> <1229881965.26604.0.camel@islay.home.hollensbe.org> <50873a360812211133i43db5fb8r6623543fd630246f@mail.gmail.com> <1229889969.26604.6.camel@islay.home.hollensbe.org> <50873a360812211257o56a51d7bh93714db83f579ae@mail.gmail.com> <1229903588.26604.8.camel@islay.home.hollensbe.org> <50873a360812211618q4e47cfa3ub1cbf8bad1e5960e@mail.gmail.com> <1229907006.26604.11.camel@islay.home.hollensbe.org> <50873a360812220232j6015b434y939c1c28d6e735d3@mail.gmail.com> <50873a360812220327j601040fdgb82cf103070fb6b4@mail.gmail.com> Message-ID: <32870f240812230629u5bdc9fbaqb471bb88b777f323@mail.gmail.com> We use the actual technologies ODBC driver for SQL server http://www.actualtechnologies.com/. It's cost $30, but was well worth it. It will run in demo mode so you can try it before buying. On Mon, Dec 22, 2008 at 6:27 AM, doug livesey wrote: > Further to that, I've been playing around, and cannot get it to connect. I'm > pretty sure that FreeTDS is OK, as the tsql connection works fine, and I can > connect & select databases & query them and everything. > So maybe my problem is with iODBC, but I don't know how to test this, so am > not sure. > For completeness (and recognising that this could well be a problem with > something other than ruby-dbi) I'll post my odbc config files -- if you > spotted something amiss there, that would be great, but I well understand > that this may be an odbc config problem, and so out of your purview. > > [ODBC Drivers] > TDS = Installed > [TDS] > Description = FreeTDS > Driver = /usr/local/lib/libtdsodbc.so > Setup = /usr/local/lib/libtdsodbc.so > > > [ODBC Data Sources] > KYLIE = TDS > [holly_test] > Driver = TDS > Description = Description of this database connection > Trace = yes > TraceFile = /tmp/odbc.log > Servername = KYLIE > Database = holly_test > [holly_production] > Driver = TDS > Description = Description of this database connection > Trace = yes > TraceFile = /tmp/odbc.log > Servername = KYLIE > Database = holly_production > [holly_production_old] > Driver = /usr/local/lib/libtdsodbc.so > Description = Description of this database connection > Trace = yes > TraceFile = /tmp/odbc.log > Servername = KYLIE > Database = holly_production > > My database.yml file contains this: > production: > database: holly_production > adapter: sqlserver > mode: odbc > dsn: KYLIE > username: holly > password: ******** > (I've also tried the DSN-less configuration with no better result.) > And, finally, seeing as I've been changing things, here is a dump of the > latest error I get when trying to connect in the rails console: > 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 > Cheers for any help you can offer, and for all offered thus far, and it's > well understood if this falls outside of your remit. > Doug. > _______________________________________________ > ruby-dbi-users mailing list > ruby-dbi-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/ruby-dbi-users > >