I am attempting to make a simple connection to a remote database. I can not seem to get it to work.
remote_db = DBI.connect('DBI:ODBC:remote-host','user','password')
remote_db.table { |table| pp table }
Any help would be greatly appreciated.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think what you are looking for is Ruby DBI.
http://ruby-dbi.rubyforge.org/
Here is an example of using DBI for ODBC connectivity:
some more in-depth info:
http://www.kitebird.com/articles/ruby-dbi.html
Or, alternatively, you can use ruby-odbc:
http://odbc-rails.rubyforge.org/