rails and rails only
2009-Aug-26 05:27 UTC
Problem while connecting MS Sql 2000 from linux.
Hi , I did all steps given in below link http://wiki.rubyonrails.org/database-support/ms-sql#dsn-less_connection And when I connect SQL 200 from my ubuntu 7.10 through SQSH it is connecting. when I try to connect through my rails application it giving error. DBI::DatabaseError: IM002 (0) [unixODBC][Driver Manager]Data source name not found, and no default driver specified from /usr/lib/ruby/gems/1.8/gems/dbd-odbc-0.2.5/lib/dbd/odbc/driver.rb:36:in `connect'' from /usr/local/lib/site_ruby/1.8/dbi/handles/driver.rb:33:in `connect'' from /usr/local/lib/site_ruby/1.8/dbi.rb:148:in `connect'' from /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/sqlserver_adapter.rb:46:in `sqlserver_connection'' from /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in `send'' from /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in `connection_without_query_cache='' from /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/query_cache.rb:54:in `connection='' from /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:230:in `retrieve_connection'' from /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in `connection'' from (irb):1 my database.yml development: adapter: sqlserver mode: ODBC dsn: connectsql username: sa password: process freetds.conf [connectsql] host = 10.100.13.11 port = 1433 tds version = 8.0 /etc/odbc.ini [connectsql] Driver = FreeTDS Description = ODBC connection via FreeTDS Trace = No Servername = connectsql Database = test /etc/odbcinst.ini [FreeTDS] Description = TDS driver (Sybase/MS SQL) Driver = /usr/lib/odbc/libtdsodbc.so Setup = /usr/lib/odbc/libtdsS.so CPTimeout CPReuse FileUsage = 1 my rails version 1.2.3 and ruby 1.8.6 Thanks in advance jK -- Posted via http://www.ruby-forum.com/.
Aldric Giacomoni
2009-Aug-26 12:37 UTC
Re: Problem while connecting MS Sql 2000 from linux.
m. jk wrote:> Hi , > > I did all steps given in below link > > http://wiki.rubyonrails.org/database-support/ms-sql#dsn-less_connection > > And when I connect SQL 200 from my ubuntu 7.10 through SQSH it is > connecting. > > when I try to connect through my rails application it giving error. > > DBI::DatabaseError: IM002 (0) [unixODBC][Driver Manager]Data source name > not found, and no default driver specified$ping -c3 connectsql # ? -- Posted via http://www.ruby-forum.com/.