tag:pragdevnotes.com,2008:/mssqlMssql - Pragmatic Development Notes2010-02-18T19:34:17ZEnkiBoško Ivaniševićbosko.ivanisevic@gmail.comtag:pragdevnotes.com,2008:Post/102010-02-18T22:34:00Z2010-02-18T19:34:17ZRuby, Rails and MS SQL server<p>Setting up Rails and Ruby to use MS <span class="caps">SQL</span> server was always painful task. Fortunately things have changed – a lot! With new <a href="http://github.com/rails-sqlserver/2000-2005-adapter">Rails <span class="caps">SQL</span> Server 2000, 2005 and 2008 Adapter</a> and Christian Werner’s <a href="http://www.ch-werner.de/rubyodbc">ruby-odbc gem</a> you can do it in a few minutes.</p>
<p>If you want to use these gems on Windows grab Ruby installation from <a href="http://www.rubyinstaller.org">RubyInstaller</a> site and be sure to install <a href="http://rubyforge.org/frs/download.php/66888/devkit-3.4.5r3-20091110.7z">DevKit</a> prior to installing ruby-odbc.</p>
<p>Versions of ruby-odbc before 0.9999 do not work on mingw based (RubyInstaller) Ruby. Luckily author was very fast and made new version very quickly after I sent him a patch. Thanks Christian!</p>
<p>Both gems work well on Ruby 1.8.6 and 1.9.1 Ruby versions on Windows with old ActiveRecords, but I hope rails adapter will be ported to ActiveRecords 3 soon.</p>