This might sound silly, but are you using a Windows-based PC? Judging
by the command line prompt it doesn’t appear to be the case. If so then
you should load UNIX ODBC I believe…
WARNING: no ODBC driver manager found.
DBI::DatabaseError: INTERN (0) [RubyODBC]Cannot allocate SQLHENV
from /usr/lib/ruby/1.8/DBD/ODBC/ODBC.rb:95:in connect' from /usr/lib/ruby/1.8/dbi.rb:424:in connect’
from /usr/lib/ruby/1.8/dbi.rb:215:in `connect’
from (irb):2
Ok Know i have this error message
irb(main):002:0> dbh = DBI.connect(‘dbi:ODBC:Corporate’,
‘’,'***’)
DBI::DatabaseError: S1000 (0) [unixODBC][FreeTDS][SQL Server]Unable to
connect to data source
from /usr/lib/ruby/1.8/DBD/ODBC/ODBC.rb:95:in connect' from /usr/lib/ruby/1.8/dbi.rb:424:inconnect’
from /usr/lib/ruby/1.8/dbi.rb:215:in `connect’
from (irb):2
gregarican a écrit :
I think a reply message in that thread pertained to file access perms
on those odbc files. Check the two ini files and ensure that the perms
are botching things up.
I would suggest googling around the FreeTDS message boards. When I just
did it seems as if your situation isn’t unique. Here’s something that
was referred to in terms of ensuring that UNIX ODBC works in
conjunction with FreeTDS → http://www.freetds.org/userguide/odbcombo.htm#E.G.SAMPLEODBCCOMBO. HTH!
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.