# Ruby and SQL Queries

**URL:** <https://www.ruby-forum.com/t/ruby-and-sql-queries/56080>\
**Category:** Ruby\
**Created:** [March 28, 2006, 1:16am UTC](https://www.ruby-forum.com/t/ruby-and-sql-queries/56080 "2006-03-28T01:16:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![crackotter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/57b2e6/32.png) [@crackotter](https://www.ruby-forum.com/u/crackotter)\
**Post date:** [March 28, 2006, 1:16am UTC](https://www.ruby-forum.com/t/ruby-and-sql-queries/56080/1 "2006-03-28T01:16:27Z")

</div>

Hi all,  
I am new to Ruby ( and to Miscrosft SQL). I want to be able to do very  
basic queries from ruby to a external MS SQL databse. I have searched  
through the web and it seems you have to jump through hoops to get ruby  
to talk to a SQL database.

1. Install freedts

2. Install sqlrelay

3. ??

I installed freedts, but I am having problems install sqlrelay (gentoo).  
Is there a easier way to do quieries in Ruby?

Thanks,  
Otter

---

<div class="post-metadata">

**Author:** ![crackotter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/57b2e6/32.png) [@crackotter](https://www.ruby-forum.com/u/crackotter)\
**Post date:** [March 28, 2006, 4:36am UTC](https://www.ruby-forum.com/t/ruby-and-sql-queries/56080/2 "2006-03-28T04:36:16Z")

</div>

Josh O. wrote:

> 1. ??  
> This may help

[http://ruby-dbi.rubyforge.org/](http://ruby-dbi.rubyforge.org/)

–  
James B.

“Blanket statements are over-rated”

---

<div class="post-metadata">

**Author:** ![crackotter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/57b2e6/32.png) [@crackotter](https://www.ruby-forum.com/u/crackotter)\
**Post date:** [March 28, 2006, 5:33am UTC](https://www.ruby-forum.com/t/ruby-and-sql-queries/56080/3 "2006-03-28T05:33:49Z")

</div>

On 3/27/06, Josh O. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi all,  
> I am new to Ruby ( and to Miscrosft SQL). I want to be able to do very  
> basic queries from ruby to a external MS SQL databse. I have searched  
> through the web and it seems you have to jump through hoops to get ruby  
> to talk to a SQL database.

On windows using the 1 click installer ruby-dbi comes installed by  
default with ODBC drivers and you can access MS-SQL that way without  
installing anything.
