D
David Lee
I am running Ruby on Fedora Core 6 and I am running into problems I do
not see on my windows box. Any help would be awesome - its been 2 days
I tried everything and even installed unixODBC and that worked but
installing freeTDS ha problems. Can someone guide me into getting this
to work?
def test_connection
begin
connect( "DBI:ODBCriver={SQL
Server};Server=#{@adapter_config["acct_db_host"]};Database=#{@adapter_config["acct_db_name"]};Uid=#{@adapter_config["acct_db_user"]};Pwd=#{@adapter_config["acct_db_pass"]}"
)
is_connected
rescue DBI:atabaseError => e
puts "Error #{e.errstr}"
rollback
ensure
#disconnect from server
disconnect
end
end
/usr/lib/ruby/site_ruby/1.8/dbi/dbi.rb:511:in `load_driver': Could not
load driver (no such file to load -- odbc) (DBI::InterfaceError)
from /usr/lib/ruby/site_ruby/1.8/dbi/dbi.rb:401:in
`_get_full_driver'
from /usr/lib/ruby/site_ruby/1.8/dbi/dbi.rb:381:in `connect'
from ./database_adapter.rb:77:in `connect'
from ./database_adapter.rb:65:in `test_connection'
from ./game_adapter.rb:6:in `initialize'
from ./ballerium/ballerium_adapter.rb:6:in `initialize'
from ./game_adapter_factory.rb:14:in `new'
from ./game_adapter_factory.rb:14:in `get_adapter'
from test.rb:11
not see on my windows box. Any help would be awesome - its been 2 days
I tried everything and even installed unixODBC and that worked but
installing freeTDS ha problems. Can someone guide me into getting this
to work?
def test_connection
begin
connect( "DBI:ODBCriver={SQL
Server};Server=#{@adapter_config["acct_db_host"]};Database=#{@adapter_config["acct_db_name"]};Uid=#{@adapter_config["acct_db_user"]};Pwd=#{@adapter_config["acct_db_pass"]}"
)
is_connected
rescue DBI:atabaseError => e
puts "Error #{e.errstr}"
rollback
ensure
#disconnect from server
disconnect
end
end
/usr/lib/ruby/site_ruby/1.8/dbi/dbi.rb:511:in `load_driver': Could not
load driver (no such file to load -- odbc) (DBI::InterfaceError)
from /usr/lib/ruby/site_ruby/1.8/dbi/dbi.rb:401:in
`_get_full_driver'
from /usr/lib/ruby/site_ruby/1.8/dbi/dbi.rb:381:in `connect'
from ./database_adapter.rb:77:in `connect'
from ./database_adapter.rb:65:in `test_connection'
from ./game_adapter.rb:6:in `initialize'
from ./ballerium/ballerium_adapter.rb:6:in `initialize'
from ./game_adapter_factory.rb:14:in `new'
from ./game_adapter_factory.rb:14:in `get_adapter'
from test.rb:11