Ruby Connecting to SQL Server 2005
It appears after you specify DBI:DriverName: you can put whatever connection info you need
DBI.connect("DBI:ODBC:Driver={SQL Server};Server=#{server};Database=#{db};Trusted_Connection=yes")
http://www.devlist.com/ConnectionStringsPage.aspx
Ruby on Rails + Sql Server 2005
So just make sure if you're working on Windows or Mac to set up an ODBC connection. You must indicate this explicitly in your database configuration for Rails.
Connecting to an MSSQL database from a Ruby on Rails application running on Ubuntu
This Stackoverflow question might help: Rails & MSSQL 2008 - Will We Hit Barriers?
Basically you will need to install a MSSQL database adapter (rather than MySQL or Postgres that most tutorials step you through), and configure your database.yml appropriately:
http://rorblog.techcfl.com/2008/04/14/ruby-on-rails-connection-to-sql-server/
http://the-banana-peel.saltybanana.com/2008/06/connecto-to-microsoft-sql-server-from.html
http://wiki.rubyonrails.org/database-support/ms-sql (Although the rails wiki looks down at time of writing)
P.S. I am assuming the MSSQL server will be running on a separate Microsoft server someplace.
How to connect to SQLServer 2k5 using Ruby 1.8.7 over W2k3 with active record 2.3.5
Ok, so I figured out.
The problem was on the missing ruby-odbc (currently version 0.9999), so, after the install of this gem all worked fine.
BUT, in one of my servers (the wich one that runs w2k8 server) I need to install the Ruby DevKit also (before the ruby-odbc gem)
That's odd.
Well. I hope that this can help someone else.
Cheers!
Related Topics
How to Create Daylight Savings Time Start and End Function in SQL Server
Rotate/Pivot Table with Aggregation in Oracle
Generate Unique Random Numbers Using SQL
Date Comparison Returns Unusual Result - SQL Oracle
How to Check for Is Not Null and Is Not Empty String in SQL Server
Postgresql Extract Last Row for Each Id
SQL Server - Copy Stored Procedures from One Db to Another
Order by Descending Date - Month, Day and Year
Sql: Sum 3 Columns When One Column Has a Null Value
Connect SQL Server in Ruby on Rails
How to Perform Update Query with Subquery in Access
Function to Get Number of Weekdays Between Two Dates Excluding Holidays
How to Create Temp Table with Select * into Temptable from Cte Query