hi erevy one
i use ruby 1.8.7 ,rails is 2.2.2
fisrt get the latest source distribution of Ruby-DBI from:
http://rubyforge.org/projects/ruby-dbi/ and copy the file:
rub-DBI is 0.2.2
lib/dbd/ADO.rb
to:
X:/ruby/lib/ruby/site_ruby/1.8/DBD/ADO/ADO.rb
then i install
gem install activerecord-sqlserver-adapter -v=2.2.8
i run the server
error is
establish_connection please install the sqlserver adapter gem install
activerecord-sqlserver-adapter
no such file to load active_record/connection_adapters/sqlserver_adapter
then i copy sqlserver_adapter from ctiverecord-sqlserver-adapter-3.0.0
to that palce
but that another error
active_support/dependencies.rb:442 in ‘load_missing_constant’
uninitialized constant activedrecord::wrappenddatabaseException
Anyone hit this ?
Regards,
/deng
try using bundler to install the gem , it will try to find all the
dependencies.
Here is a series of steps that I had to go through in order to get
SQLServer 2005 working for my needs. You might need to skip/replace
some steps. I hope this helps you.
- Install Ruby (1.8.6): Download Ruby
- Install rubygems:
a. Download RubyGems | RubyGems.org | your community gem host (zip version)
b. Unpack to a directory and cd there
c. ruby setup.rb
- Install rails: gem install rails –v=2.3.5
- Install mongrel: gem install mongrel
- Install mongrel service: gem install mongrel_service
- Install SQL Server adapter: gem install activerecord-sqlserver-
adapter
- Install ODBC gem: gem install odbc-rails
- Install SQL Server Management utility (from Microsoft)
- Create SQL Server DB
- Create login in SQL Server
- Create DB user
- Create DSN in Windows:
a. Control Panel → Adminstrative Tasks → Data Sources (ODBC)
b. Click on System DSN → Add
c. Select type SQL Server
i. Name: Whichever name you want to give it here.
ii. Description: Your description here
iii. Server: Server name (whichever is the server name you see
in SQL Server Management utility)
iv. Use SQL Authentication