# DB2 UDB connectivity

**URL:** <https://www.ruby-forum.com/t/db2-udb-connectivity/53960>\
**Category:** Ruby\
**Created:** [February 18, 2006, 4:37pm UTC](https://www.ruby-forum.com/t/db2-udb-connectivity/53960 "2006-02-18T16:37:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![miked](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@miked](https://www.ruby-forum.com/u/miked)\
**Post date:** [February 18, 2006, 4:37pm UTC](https://www.ruby-forum.com/t/db2-udb-connectivity/53960/1 "2006-02-18T16:37:36Z")

</div>

I have a second shot at getting our dpt to use Ruby now that the ‘perl  
guy’ has left, but i’m back to the original hurdle that stopped us from  
using this previously.  
Basically, I cannot connect to DB2 and have tried ALL the scripts and  
suggestions from Sam Ruby, blade.nagaokaut.ac.jp etc and none seem to  
work.  
I have Perl installed and working with DB2, so I know that I have all  
the necessary DB2 files and also have the Express-C DB2 database on my  
laptop - but i don’t like the look of all that syntax stuff.  
I’m not a ‘coder’ so it’s probably something really stupid with the  
DB2DIR path definition.  
This was the last extconf code I tried - and I have tried every ‘/’ ‘’  
‘//’ format possible as per the suggestions:

require “mkmf”

DB2LIB = “db2cli”  
DB2DIR = “C:/Program Files/IBM/SQLLIB”

dir\_config( “db2”, DB2DIR + “/include”, DB2DIR + “/lib” )

if have\_header(“sqlcli.h”) and have\_library(DB2LIB, “SQLConnect”)  
create\_makefile “db2cli”  
else  
raise “abort”  
end

here’s your chance to help spread ruby lol  
i.e. please help
