dbi - install - connect error

P

Paul Vudmaska

--------------020501040902090001090901
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

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 '<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/>' + [email protected]('<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


--------------020501040902090001090901--
 
K

Kaspar Schiess

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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 '<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/>' + [email protected]('<br/>')
| puts <<-EOS
| <html>
| <body>
| #{se}
| </body>
| </html> 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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFAnyjqFifl4CA0ImQRApx/AJ4v5lcGKdR04h03D6AgIuezrl7mtwCgtJcU
Afv0V20vzHJH9sl2nUmNLgQ=
=SyfN
-----END PGP SIGNATURE-----
 
M

Michael Neumann

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

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

Regards,

Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top