forked from rails-sqlserver/activerecord-sqlserver-adapter
-
Notifications
You must be signed in to change notification settings - Fork 0
Platform Installation Windows
KDGundermann edited this page Sep 13, 2010
·
19 revisions
Before installing activerecord-sqlserver-adapter you have to install the ruby-odbc gem
But beware ! It needs a C – compiler for installation.
Either you have a ten year old Microsoft MSVC++ 6.0 Compiler
or better you may install the Ruby Development Kit first.
So step by step:
- Install devkit
- gem install ruby-odbc
- gem install activerecord-sqlserver-adapter
-
Maybe install
Microsoft SQL Server 2005 Native Client
Microsoft SQL Server 2008 Native Client - Create a ODBC Data Source
-
Modify database.yml
development:
adapter: sqlserver
database: MyDatabase
dsn: dsn_MyDatabase
mode: odbc
username: TestUser
password: xxxxx
encoding: utf8 -
Create an activemodel
class Customer < ActiveRecord::Base
set_table_name “dbo.Customer”
set_primary_key “CustomerID”
end -
Create an activecontroller
class CustomerController < ApplicationController
- StartRails: ruby script\server
and voilá : I get the error message : “failed to allocate memory”
ok, stay tuned I will do my best to find the failure cause