[Nitro] OG and DBI: Oxyliquit draft tip

Mark Van De Vyver mvyver at gmail.com
Fri Aug 31 03:50:14 EDT 2007


Hi,

To use DBI there is some work that needs to be done to install the
drivers.  I thought to make a Oxyliquit tip about this - I'd
appreciate feedback on the script below.

The draft below prepares for sqlite, mysql and odbc.
It'd be useful to know if it is possible to change DBNAME (used twice)
to install postgres , Oracle, any other drivers?

Before placing anything on Oxyliquit it would be useful to confirm
which distributions the following 'script' succeeds on - the location
of the odbc library might be an issue if it is not in /usr/lib....
other issues?
I've tested the following on openSUSE 10.2

My understanding is that DBI and ruby-ODBC are packaged in windows
one-click installer - can some one confirm that?

TIA
Mark

#-- start-bash ----------------------------
su
DBNAME=mysql
ODBCVER=0.9995
DBIVER=0.1.1
pushd /tmp
wget http://ch-werner.de/rubyodbc/ruby-odbc-${ODBCVER}.tar.gz
tar -xvf ruby-odbc-${ODBCVER}.tar.gz
pushd ruby-odbc-${ODBCVER}
ruby extconf.rb --enable-dlopen
make
make install
#Installation of utf8 version:
ruby -Cutf8 extconf.rb --enable-dlopen
make -C utf8
make -C utf8 install
popd

gem install ${DBNAME} sqlite
wget http://rubyforge.org/frs/download.php/12368/dbi-${DBIVER}.tar.gz
tar -xvf dbi-${DBIVER}.tar.gz
pushd ruby-dbi
ruby setup.rb config --with=dbi,dbd_sqlite,dbd_odbc,dbd_${DBNAME}
ruby setup.rb install
popd
popd
#-- end-bash ----------------------------


More information about the Nitro-general mailing list