Problems when connecting to Sql server 2008 odbc no such file to load error

Hello i am a relative noob to the web world and i am now atempting to
move a rails app to a windows server and connect it to a SQL 2008
database

in database.yml file

  adapter: sqlserver
  mode: odbc
  dsn: Driver={SQL Native
Client};Server=localhost;Database=DMBackEndServer;username=DM;Pwd=DM;

in gemfile
gem 'activerecord-sqlserver-adapter'

i have also setup a system data source via microsoft odbc data source
administrator tool

but all i get no matter how hard i try is

LoadError (no such file to load -- odbc):

What am i missing here ??

Help would be much apprechiated

if you are connecting to MS sql you should be using

adapter: sqlserver
mode: ado
database: blahblah
host: mode_blah

if you are connecting to MS sql you should be using

adapter: sqlserver

mode: ado
database: blahblah
host: mode_blah

forgot to add

dsn : much_more_blah
autocommit: true

Thanks will try that now and report back if it solved my problem

that only gives me syntax error mode:ado (ArgumentError) i get the
same error on that line when trying mode:odbc

I found the problem i wrote mode:ado but i should be mode: ado the
space inbetween is inportant.
Anyway on to the next problem i now get the error unknown connection
mode when i use ado
Is ado included in the dbi gem or do i have to install some other
gem ?

Ok it is still not working and i have gotten indikations from forum
posts and blogs that i should use mode: adonet this bombs out with the
message no such file to load -- System.Data

gem 'activerecord-sqlserver-adapter'

LoadError (no such file to load -- odbc):

When using the odbc connection mode for the adapter,
you need the gem ruby-odbc to be installed. You will
find more information to this gem on
  http://www.ch-werner.de/rubyodbc/

When you are running on a Linux System I would
recommend using the new TinyTDS gem:
  http://github.com/rails-sqlserver/tiny_tds

Use mode: adonet only when you are running on IronRuby !!

I have installed both gems via
gem install 'gemname'
after which i have wrote
gem 'gemname' in my gem file and then run bundle install inside the
project folder

'gemname' = is replaced by the name of the gem

So yes i have installed those gems i hav also tried this with ruby
1.9.2 and i am currently using 1.8.7 since this version seems to be
more stable for win(?)

I am getting a lot of indications that i should manually copy a file
called ADO.rb to my .../ruby187/lib/ruby/gems/1.8/gems/dbi-0.4.5/lib/
dbi folder
where do i download this file ? every link to it seems to point me to
a dbi gem but not this file.

also the error i am getting is still argument error unknown connection
mode for mode => "ado"

@Fredrik TiC Jansson

What os are you running your dev on?

Radhames Brito wrote in post #956337:

if you are connecting to MS sql you should be using

adapter: sqlserver
mode: ado
database: blahblah
host: mode_blah

forgot to add

dsn : much_more_blah
autocommit: true

Or rather, don't use mode: ado. Use mode: odbc if you're using ODBC, or
(better yet) install tiny_tds, specify mode: dblib, and cut ODBC out of
the equation entirely!

Best,

Windows server 2003

the app was originally developed on OSX snow leopard using just
sqlite3 and i sucessluffy migrated it and got it running without a
hitch on win server 2003
but i have to get it working with SQL sever 2008 for production
purposes (sqlite3 just wont cut it)

Thinking this was just a windows problem was wrong ! i am apperently
doing something really really wrong. i cant seem to get any gem
besides rails to install properly !

installing mongrel works but installing
dbd-odbc,dbi,activerecord-sqlserver-adatper and trying to use it
always gives the no such file to load -- odcb error ! i have had som
other errors which where solved by manually moving the files to the
ruby appears to be looking for them but i am suspecting this is not
the way to do it.

After som experimenting i am totally and utterly lost.

I run bundle install on my bundle and for example get using ruby-odbc
i then when i start my rails server get
require: no such file to load -- ruby-odbc

why?

Fredrik TiC Jansson wrote in post #957147:

Windows server 2003

the app was originally developed on OSX snow leopard using just
sqlite3 and i sucessluffy migrated it and got it running without a
hitch on win server 2003
but i have to get it working with SQL sever 2008 for production
purposes (sqlite3 just wont cut it)

You might like TinyTds. I've just changed an app over to it here at
work, and I am really liking it.

Also, if you have a choice, *do not* use a Windows server, and *do not*
use MS SQL. I recommend *nix of some sort (I use Ubuntu) and PostgreSQL
for ease and security of deployment.

Best,

i succeded in getting it working and posted a short how-to in this
thread http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/90bac21d2f5d2616/908fbcaed47c5259#908fbcaed47c5259

will probably go the CentOS PhuzionPassenger MySql route in the
future.