I'm using WATIR and Ruby 1.9.3 to test web applications and I need to connect to Microsoft SQL Server Management Studio 2008 (Windows 7 64-bit). I already installed "DBI and DBD-ODBC" gems. I have also installed the ODBC Data Source, which I named 'BUILD'. I was following the next steps, but unfortunately I'm getting a syntax error message. This is what I tried:
require 'dbi'
conn = DBI.connect('DBI:ODBC:BUILD', 'username', 'password')conn.connected?
Which gives me this error message:
SyntaxError: (irb):2: syntax error, unexpected tIDENTIFIER, expecting $end
...'username', 'password')conn.connected?
... ^
from C:/Ruby193/bin/irb:12:in `<main>'
I honestly don't know what I'm doing wrong. I searched online for a solution, but apparently I couldn't find any answer that it can help me. I'll appreciate your help thanks!