I have a ruby script that can connect to an IBM_DB database and gather
all the necessary information for my script to run, but once i use
rubyscript2exe to create a .exe of the script it keeps saying that my
database connection is false and wont connect.
any ideas as to what the problem is?
-Bobsmyph
On 9/10/2010 1:01 PM, Bob S. wrote:
I have a ruby script that can connect to an IBM_DB database and gather
all the necessary information for my script to run, but once i use
rubyscript2exe to create a .exe of the script it keeps saying that my
database connection is false and wont connect.
any ideas as to what the problem is?
-Bobsmyph
First off, I highly recommend switching to OCRA
(ocra | RubyGems.org | your community gem host) over rubyscript2exe, as rubyscript2exe
has been discontinued for almost 3 years. That alone may fix your
issue.
If it doesn’t, could you provide more information, like the exact text
of the error message and a small script that reproduces the problem?
First off, I highly recommend switching to OCRA
(ocra | RubyGems.org | your community gem host) over rubyscript2exe, as rubyscript2exe
has been discontinued for almost 3 years. That alone may fix your
issue.
If it doesn’t, could you provide more information, like the exact text
of the error message and a small script that reproduces the problem?
I have tried to install OCRA but keep getting a ton of errors.
so i would like to be able to use what i had. below is a script that
works when i run it as a .rb but when i make it a .exe through
rubyscript2exe it no longer will connect to the DB. the DBname is
cataloged if that makes any difference
require ‘mswin32/ibm_db’
sql = “select * from statement where row = ‘1’”
dbh = IBM_DB::connect(databaseName, “”, “”)
sth = IBM_DB::exec(dbh, sql)
holdA = IBM_DB::fetch_array(sth)
puts holdA[0]