Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Have you considered using JRuby? Microsoft has a <a href="http://msdn.microsoft.com/en-us/data/aa937724.aspx" rel="nofollow noreferrer">JDBC driver for SQL Server</a> that can be run on UNIX variants (it's pure Java AFAIK). I was able to get the 2.0 technology preview working with JRuby and Rails 2.1 today. I haven't tried migrations yet, but so far the driver seems to be working quite well.</p> <p>Here's a rough sketch of how to get it working:</p> <ol> <li>Make sure Java 6 is installed</li> <li>Install JRuby using the instructions on the <a href="http://www.jruby.org/" rel="nofollow noreferrer">JRuby website</a></li> <li>Install Rails using gem (<code>jruby -S gem install rails</code>)</li> <li>Download the UNIX package of <a href="http://msdn.microsoft.com/en-us/data/aa937724.aspx" rel="nofollow noreferrer">Microsoft's SQL Server JDBC driver</a> (Version 2.0)</li> <li>Unpack Microsoft's SQL Server driver</li> <li>Find sqljdbc4.jar and copy it to JRuby's lib directory</li> <li><code>jruby -S gem install activerecord-jdbcmssql-adapter</code></li> <li>Create a rails project (<code>jruby -S rails hello</code>)</li> <li>Put the proper settings in database.yml (example below)</li> <li>You're all set! Try running <code>jruby script/console</code> and creating a model.</li> </ol> <pre> development: host: localhost adapter: jdbc username: sa password: kitteh driver: com.microsoft.sqlserver.jdbc.SQLServerDriver url: jdbc:sqlserver://localhost;databaseName=mydb timeout: 5000 </pre> <p>Note: I'm not sure you can use Windows Authentication with the JDBC driver. You may need to use SQL Server Authentication.</p> <p>Best of luck to you!</p> <p>Ben</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload