Public bug reported:

I installed libdbi-ruby with apt-get, and the basic connect function
fails:

% ruby simple.rb
/usr/lib/ruby/site_ruby/1.8/dbi.rb:344:in 'load_driver': Could not
 load
 driver (no such file to load -- mysql) (DBI::InterfaceError)
     from /usr/lib/ruby/site_ruby/1.8/dbi.rb:227:in
 '_get_full_driver'
     from /usr/lib/ruby/site_ruby/1.8/dbi.rb:213:in 'connect'
     from simple.rb:9

where simple.rb is as follows:

#!/usr/bin/ruby -w
   # simple.rb - simple MySQL script using Ruby DBI module

   require "dbi"

begin
 # connect to the MySQL server
 dbh = DBI.connect("DBI:Mysql:test:localhost", "testuser", "testpass")
 # get server version string and display it
 row = dbh.select_one("SELECT VERSION()")
 puts "Server version: " + row[0]
rescue DBI::DatabaseError => e
 puts "An error occurred"
 puts "Error code: #{e.err}"
 puts "Error message: #{e.errstr}"
ensure
 # disconnect from server
 dbh.disconnect if dbh
end
---snip---
I was able to fix this problem by installing both:

libmysql-ruby and libdbd-mysql-ruby

I am not sure the first was necessary, as it didn't begin working until
I did the second.

I believe it is more normal in the Debian world for installation of the
libdbi-ruby package alone to result in a fully functional installation.
If this is an exception for some reason, it seems to me explanations for
that should somehow be made clearer to the beginning user, like in
prompting from the package installation, or perhaps an "ATTENTIONFOOL"
file or something, however it seems to me that the best solution would
be a default installation that works, and then further instructions on
how to do other things with it, so I'd recommend installations of
libdbi-ruby to automatically call in the needed stuff from the other two
packages.

Sincerely, Xeno

** Affects: libdbi-ruby (Ubuntu)
     Importance: Undecided
         Status: New

-- 
libdbi does not install functionally from libdbi-ruby
https://bugs.launchpad.net/bugs/180871
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to