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 ?
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/
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
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”
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!
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
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.