Dbi - install - connect error

I’ve just installed dbi on a new host. The install seemed to go
well…–with mysql, etc. No errors.

I’m getting this error trying to connect.

  • is not a class/module*

/usr/local/lib/ruby/site_ruby/1.8/dbi/dbi.rb:490:in load_driver' /usr/local/lib/ruby/site_ruby/1.8/dbi/dbi.rb:392:in_get_full_driver’
/usr/local/lib/ruby/site_ruby/1.8/dbi/dbi.rb:372:in connect' /usr/local/www/test.daspeachhaus.com/www/default.rbx:12 /usr/local/lib/ruby/site_ruby/1.8/apache/ruby-run.rb:70:inload’
/usr/local/lib/ruby/site_ruby/1.8/apache/ruby-run.rb:70:in `handler’

Here is my file:

#>default.rbx

#!/usr/local/bin/ruby18/

begin

require 'cgi'
cgi = CGI.new
cgi.header('content-type'=>'text/html')

puts '<html><body>'

require 'dbi'
DBI.connect("dbi:Mysql:database:host",'usr','pwd')


puts '</body></html>'

rescue Exception

$stdout.cancel

se = '<b>' + $!.to_s + '</b><p/>' + $@.join('<br/>')

puts <<-EOS
    <html>
    <body>
    #{se}
    </body>
    </html>   
EOS

end

Any ideas where I might look to figure this out?

BTW : For anyone looking for a ruby host, you might want to check out
hub.org. They use a virtual machine…meaning.

  1. you dont have to worry about sharing the interp w/other hosts
  2. you have root access

But they do not have a lot of experience w/ruby.

thank you for any help,
:Paul

Paul Vudmaska wrote:

I’ve just installed dbi on a new host. The install seemed to go
well…–with mysql, etc. No errors.

I’m getting this error trying to connect.

  • is not a class/module*

/usr/local/lib/ruby/site_ruby/1.8/dbi/dbi.rb:490:in load_driver' /usr/local/lib/ruby/site_ruby/1.8/dbi/dbi.rb:392:in _get_full_driver’
/usr/local/lib/ruby/site_ruby/1.8/dbi/dbi.rb:372:in connect' /usr/local/www/test.daspeachhaus.com/www/default.rbx:12 /usr/local/lib/ruby/site_ruby/1.8/apache/ruby-run.rb:70:in load’
/usr/local/lib/ruby/site_ruby/1.8/apache/ruby-run.rb:70:in `handler’

Here is my file:

#>default.rbx

#!/usr/local/bin/ruby18/

begin

require ‘cgi’
cgi = CGI.new
cgi.header(‘content-type’=>‘text/html’)
puts ‘’

require ‘dbi’
DBI.connect(“dbi:Mysql:database:host”,‘usr’,‘pwd’)
puts ‘’

rescue Exception
$stdout.cancel
se = ‘’ + $!.to_s + ‘

’ + $@.join(‘
’)
puts <<-EOS


#{se}

EOS

end

Is this your actual code ? From the top of my head I would downcase
mysql as in ‘dbi:mysql:mydatabase:host’.

Have you run the tests from the mysql install against your ‘test’
database ?

k

Have you additionally installed the mysql-ruby or ruby-mysql driver?
Both are available from RAA.

Regards,

  Michael

···

On Mon, May 10, 2004 at 07:05:46AM +0900, Paul Vudmaska wrote:

I've just installed dbi on a new host. The install seemed to go
well...--with mysql, etc. No errors.