require 'dbi' # 0.4.2
dbh = DBI.connect('DBI:ODBC:PACS', 'username', 'password')
This works in IRB; in Rails it fails (taken from Rails console):
DBI::InterfaceError: Unable to load driver 'ODBC' (underlying error:
uninitialized constant DBI::DBD::ODBC)
from C:/scripts/Rads/vendor/gems/dbi-0.4.2/lib/dbi.rb:300:in
`load_driver'
from c:/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize'
from C:/scripts/Rads/vendor/gems/dbi-0.4.2/lib/dbi.rb:242:in
`load_driver'
from C:/scripts/Rads/vendor/gems/dbi-0.4.2/lib/dbi.rb:160:in
`_get_full_driver'
from C:/scripts/Rads/vendor/gems/dbi-0.4.2/lib/dbi.rb:145:in
`connect'
from (irb):2
I haven't found anything online that was a substantial help :/
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---