# SQL Server 2008

**URL:** <https://www.ruby-forum.com/t/sql-server-2008/184505>\
**Category:** Rails\
**Created:** [March 3, 2010, 4:57pm UTC](https://www.ruby-forum.com/t/sql-server-2008/184505 "2010-03-03T16:57:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steven\_RSElliott\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/958977/32.png) [@Steven\_RSElliott\_J](https://www.ruby-forum.com/u/Steven_RSElliott_J)\
**Post date:** [March 3, 2010, 4:57pm UTC](https://www.ruby-forum.com/t/sql-server-2008/184505/1 "2010-03-03T16:57:10Z")

</div>

Hello friends,

I have been asked to write front-end for an accounting system that  
would  
allow customers to view their bill and pay online, reconcile their bill,  
add/delete people that they are paying for etc. The database that I need  
to  
use is already in existence and is SQL Server 2008; has anyone had  
experience doing this sort of project? I would be interested to know how  
you  
proceeded. I am using a Mac and most everything I have read is that I  
should  
be developing this on a windows box and on the same machine as the  
database  
which doesn’t make much sense.

I am trying to figure out the best way to get started but seem to be  
having  
a mental block.

Any help would be greatly appreciated.

Thanks  
Steve

---

<div class="post-metadata">

**Author:** ![Steven\_RSElliott\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/958977/32.png) [@Steven\_RSElliott\_J](https://www.ruby-forum.com/u/Steven_RSElliott_J)\
**Post date:** [March 3, 2010, 5:08pm UTC](https://www.ruby-forum.com/t/sql-server-2008/184505/2 "2010-03-03T17:08:18Z")

</div>

On Mar 3, 8:45 am, “Steven R. Elliott Jr” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> I am trying to figure out the best way to get started but seem to be having  
> a mental block.
> 
> Any help would be greatly appreciated.
> 
> Thanks  
> Steve

Hi Steve,

Rails apps can definitely talk to SQL Server 2008, and you can develop  
the Rails app on our mac like normal. You can probably use sqlite in  
development mode, and use sql server in production, but there are a  
few things to keep in mind:

1. You’ll need to get the SQL Server activerecord adapter, and  
reference it from your database.yml
2. SQL Server won’t run on a Mac, so you’ll need to somehow access an  
instance of sql server to test with. If they can give you the full  
DSN string to their server (hopefully a testing server), you’ll be all  
set.
3. If you’re expected to follow non-Rails standards for table/column  
naming conventions, you’ll have to just make sure you tell your model  
classes about it.

Here’s a good post about setting up your database.yml for sql server:

> **[Rails 2 and SQL Server 2008 on Windows made simple](http://rubyrailsandwindows.blogspot.com/2008/03/rails-2-and-sql-server-2008-on-windows_24.html)**
>
> I always wondered if rails was really working well with SQL Server. A lot of posts on the web concern every database on earth excepted SQL S...

Hope this helps

Jeff

> **[Hey Daddio!](http://www.softiesonrails.com)**
>
> Home of Hey Daddio Software

> **[Pragmatic Bookshelf: By Developers, For Developers](https://pragprog.com)**
>
> We improve the lives of professional developers. We create timely, practical books on classic and cutting-edge topics to help you learn and practice your craft, and accelerate your career. Come learn with us.

---

<div class="post-metadata">

**Author:** ![Steven\_RSElliott\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/958977/32.png) [@Steven\_RSElliott\_J](https://www.ruby-forum.com/u/Steven_RSElliott_J)\
**Post date:** [March 3, 2010, 5:41pm UTC](https://www.ruby-forum.com/t/sql-server-2008/184505/3 "2010-03-03T17:41:05Z")

</div>

On Wed, Mar 3, 2010 at 8:07 AM, Jeff [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Rails apps can definitely talk to SQL Server 2008, and you can develop  
> the Rails app on our mac like normal. You can probably use sqlite in  
> development mode, and use sql server in production, but there are a  
> few things to keep in mind:

All good stuff, and let me add one thing, based on my experience with  
an app that’s primarily developed on MRI/MySQL and deployed on a  
JRuby/Oracle platform – write tests like there’s no tomorrow 🙂

You will almost certainly find cases where the adapters for those two  
respective DBs behave differently; good tests will help you determine  
whether it’s an adapter bug or a logic bug in your app.

## HTH, and good luck,

Hassan S. ------------------------ removed\_email\_address@domain.invalid  
twitter: @hassan
