On Nov 2, 7:38 am, "Magnus D." <[email protected]> wrote:
> I'm trying to connect to a SQLServer 2008 database running on localhost,
> but I can't seem to get it working.

Hi Magnus,

I am using MSSQL and like you I had lots of trouble making it work but
I finally did get it to work. I am also using XP and here is my Ruby
and Rails environment:

ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]
Rails 2.3.5

Here is a list of the steps I took from beginning to end. You might
need to change/skip some of the steps. I hope it helps:

1.      Install Ruby (1.8.6): http://www.ruby-lang.org/en/downloads/
2.      Install rubygems:
   a.   http://rubygems.org/pages/download (zip version)
   b.   Unpack to a directory and cd there
   c.   ruby setup.rb
3.      Install rails: gem install rails –v=2.3.5
4.      Install mongrel: gem install mongrel
5.      Install mongrel service: gem install mongrel_service
6.      Install SQL Server adapter: gem install activerecord-sqlserver-
adapter
7.      Install ODBC gem: gem install odbc-rails
8.      Install SQL Server Management utility (from Microsoft)
9.      Create SQL Server DB (name 'give it a name here')
10.     Create login in SQL Server ('give it a name here')
11.     Create DB user ('give it a name here')
12.     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: 'give it a name here'
      ii. Description: 'give it a name here'
      iii. Server: Server name (i.e.: 'Whatever name the DB has under
SQL Server Manangement here')
      iv. Use SQL Authentication

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to