On Sep 4, 4:46 pm, Iñaki Baz Castillo <[email protected]> wrote: > Humm, note what happens to me when trying to repeat your test: > > # ruby -I lib /usr/bin/sequel -E mysql://root:xx...@localhost/xxxxxxx > Error: Sequel::AdapterNotFound: Could not load mysql adapter: > require 'mysql' did not define Mysql::CLIENT_MULTI_RESULTS! > You are probably using the pure ruby mysql.rb driver, > which Sequel does not support. You need to install > the C based adapter, and make sure that the mysql.so > file is loaded instead of the mysql.rb file. > /usr/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/database.rb:112:in > `adapter_class' > > In fact, if I do: > > irb> require "mysql" > LoadError: require 'mysql' did not define Mysql::CLIENT_MULTI_RESULTS! > You are probably using the pure ruby mysql.rb driver, > which Sequel does not support. You need to install > the C based adapter, and make sure that the mysql.so > file is loaded instead of the mysql.rb file. > > from ./mysql.rb:2 > from (irb):1:in `require' > from (irb):1 > from :0 > > but if I use the mysql gem I don't get the error: > > irb> require "rubygems" > true > irb:002:0> gem "mysql" > true > > hummm... > > which exactly version of the Ruby mysql driver must I install? is it installed > via gem? > > Thanks a lot.
You need to use the mysql.so driver (the wrapper for the C library). I think any recent version works, but 2.8.1 is probably best. The pure ruby mysql.rb file does not work with Sequel. Your problem is that you have a file named mysql.rb in the current directory. You should rename that file. Jeremy --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sequel-talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en -~----------~----~----~----~------~----~------~--~---
