How to connect ruby on rails 3 to SQL Server
create ruby project http://guides.rubyonrails.org/getting_started.html
on Configuring a Database section if you decide to connect to MSSQL try this steps:
1)
open SQL Server and add your database
create database SharonBlog_development
2)
Open ROR config\database.yml set the connection string(simple connection property):
development: adapter: sqlserver
host: sharon database: SharonBlog_development
username: Usersharon
password: fill in the password
3)A dd 'tiny_tds' to Gemfile
open Gemfile and add the new lines after gem 'rails', '3.2.3' :
source 'https://rubygems.org'
gem 'rails', '3.2.3'
gem 'tiny_tds'
gem 'activerecord-sqlserver-adapter'
4) Execute rake:migrate from command line:
open project config command line and run rake db:migrate
D:\eclipse\Workspace\SharonBlog\config>rake db:migrate
