Ask a Question related to Ruby, Design and Development.
-
Orion Hunter #1
Ruby DBI problem
I'm trying to get MySQL to work with Ruby 1.8.
I've d/l and installed the DBI (from RAA). I installed as follows:
$>ruby setup.rb config --with=dbi,dbd_mysql,dbd_msql
setup.rb:586: warning: parenthesize argument(s) for future version
entering config phase...
config done.
$>ruby setup.rb setup
setup.rb:586: warning: parenthesize argument(s) for future version
entering setup phase...
setting #! line to "#!/usr/local/bin/ruby"
setup.rb: skip bin/proxyserver(dbd_proxy) by user option
setup.rb: skip ext/dbd_sqlite(dbd_sqlite) by user option
setup.rb: skip ext/dbd_sybase(dbd_sybase) by user option
setup done.
$>ruby setup.rb install
entering install phase...
mkdir -p /usr/local/bin
install sqlsh.rb /usr/local/bin
setup.rb: skip bin/proxyserver(dbd_proxy) by user option
setup.rb: skip lib/dbd_ado(dbd_ado) by user option
setup.rb: skip lib/dbd_db2(dbd_db2) by user option
setup.rb: skip lib/dbd_interbase(dbd_interbase) by user option
mkdir -p /usr/local/lib/ruby/site_ruby/1.8/DBD/Msql
install Msql.rb /usr/local/lib/ruby/site_ruby/1.8/DBD/Msql
mkdir -p /usr/local/lib/ruby/site_ruby/1.8/DBD/Mysql
install Mysql.rb /usr/local/lib/ruby/site_ruby/1.8/DBD/Mysql
setup.rb: skip lib/dbd_odbc(dbd_odbc) by user option
setup.rb: skip lib/dbd_oracle(dbd_oracle) by user option
setup.rb: skip lib/dbd_pg(dbd_pg) by user option
setup.rb: skip lib/dbd_proxy(dbd_proxy) by user option
setup.rb: skip lib/dbd_sqlrelay(dbd_sqlrelay) by user option
mkdir -p /usr/local/lib/ruby/site_ruby/1.8/dbi
install columninfo.rb /usr/local/lib/ruby/site_ruby/1.8/dbi
install dbi.rb /usr/local/lib/ruby/site_ruby/1.8/dbi
install row.rb /usr/local/lib/ruby/site_ruby/1.8/dbi
install sql.rb /usr/local/lib/ruby/site_ruby/1.8/dbi
install trace.rb /usr/local/lib/ruby/site_ruby/1.8/dbi
install utils.rb /usr/local/lib/ruby/site_ruby/1.8/dbi
install version.rb /usr/local/lib/ruby/site_ruby/1.8/dbi
mkdir -p /usr/local/lib/ruby/site_ruby/1.8/.
install dbi.rb /usr/local/lib/ruby/site_ruby/1.8/.
setup.rb: skip ext/dbd_sqlite(dbd_sqlite) by user option
setup.rb: skip ext/dbd_sybase(dbd_sybase) by user option
install done.
However, when I type the following in at the command line: (with approriate
username, pass, dbname, etc, and yes, the DB I try to use exists and this
user has access)
$> ruby -e 'require "dbi"; dbh = DBI.connect("DBI:MySQL:mydb", "username",
"mypass")'
I get the following error:
/usr/local/lib/ruby/site_ruby/1.8/dbi/dbi.rb:502:in `load_driver': Could not
load driver (No such file to load -- mysql) (DBI::InterfaceError)
from /usr/local/lib/ruby/site_ruby/1.8/dbi/dbi.rb:392:in
`_get_full_driver'
from /usr/local/lib/ruby/site_ruby/1.8/dbi/dbi.rb:372:in `connect'
from -e:1
So, instead of specifying the config --with option, I did default (all)
$>ruby setup.rb config
(same output as before)
$>ruby setup.rb setup (** NOTE this output is different,and gives errors)
entering setup phase...
setting #! line to "#!/usr/local/bin/ruby"
setting #! line to "#!/usr/local/bin/ruby"
/usr/local/bin/ruby extconf.rb
checking for sqlite_open() in -lsqlite... no
make
make: *** No targets specified and no makefile found. Stop.
setup failed
'system make' failed
try "ruby setup.rb --help" for usage
I go ahead and try to install anyway...
$>ruby setup.rb install
(same output as above, but instead of skips, it installs all. NOTE -- on
errors here, even with the above errors in the setup.rb setup)
Then, I go ahead and try my above "test", with the same errors.
What am I doing wrong here?
__________________________________________________ _______________
Compare high-speed Internet plans, starting at $26.95.
[url]https://broadband.msn.com[/url] (Prices may vary by service area.)
Orion Hunter Guest
-
Problem with Ruby from CVS & ruby-ldap on Panther
I've update my PB G4 to Penther recently and recompiled ruby from CVS. I've also recompiled ruby-ldap. When running a script of mine that extract... -
Big problem with debian ruby 1.8.0-1
Hello, I have just upgraded ruby on my debian unstable to ruby 1.8.0-1 (2003-10-05), and my program has crashed. Here is the stripped down... -
[ANN] ruby-freedb, ruby-serialport, ruby-mp3info moved to Rubyforge
http://ruby-freedb.rubyforge.org/ http://ruby-serialport.rubyforge.org/ http://ruby-mp3info.rubyforge.org/ bye! --... -
Problem with ruby-dbi-all-0.0.20 and/or ruby-1.8.0
The following test program works correctly with ruby-dbi-all-0.0.18 under ruby-1.6.8, but not ruby-dbi-all-0.0.20 under ruby-1.8.0: ... -
Ruby 1.8.0-9 Problem
--0-1120296897-1058884260=:38363 Content-Type: text/plain; charset=us-ascii Shouldn't there be a warning or error message when try to concatenate... -
Orion Hunter #2
Re: Ruby DBI problem
Doh! Thanks, that did the trick.
And, for anyone else who looks this thread up for help, I also found that I
had to d/l and install the libraries and headers for MySQL to get the
aforementioned driver installed and working.
__________________________________________________ _______________>From: Michael Neumann <mneumann@ntecs.de>
>To: Orion Hunter <orion2480@hotmail.com>
>Subject: Re: Ruby DBI problem
>Date: Tue, 18 Nov 2003 12:25:43 +0100
>
>On Tue, Nov 18, 2003 at 02:27:02PM +0900, Orion Hunter wrote:>> > I'm trying to get MySQL to work with Ruby 1.8.
> >
> > I've d/l and installed the DBI (from RAA). I installed as follows:
>The Mysql DatabaseDriver from the DBI requires the following package:
>
> [url]http://www.tmtm.org/mysql/[/url]
>
>Install it, then it will work!
>
>Regards,
>
> Michael
Page a contact’s mobile phone with MSN Messenger. Get it FREE!
[url]http://www.msnmessenger-download.com[/url]
Orion Hunter Guest



Reply With Quote

