Connecting to an MSSQL database from a Ruby on Rails application running on Ubuntu

后端 未结 7 1334
名媛妹妹
名媛妹妹 2021-01-01 00:34

I have a situation where I\'m trying to build a web app which takes a total count of records in a table and outputs it to the screen. Sounds simple right...?

The mai

7条回答
  •  生来不讨喜
    2021-01-01 00:54

    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.

提交回复
热议问题