On Aug 5, 4:10 pm, dj <[email protected]> wrote:
> Something stupid no doubt, but I verified the settings, which work
> fine via this api:http://www.tmtm.org/en/ruby/mysql/
>
> here's the code:
>
> require 'rubygems'
> require 'sequel'
>
> #DB = Sequel.connect
> (:adapter=>'mysql', :host=>'localhost', :database=>'finqueries',
> :user=>'root', :password=>'')
> # tried this, same thing
> DB = Sequel.connect('mysql://root:@localhost:3306/finqueries')
> dataset = DB["SELECT pricedate FROM pricedata"]
> puts dataset.count # => this is line 7, source of errors; see below
>
> produces this:
>
> /usr/lib/ruby/gems/1.8/gems/sequel-3.3.0/lib/sequel/adapters/mysql.rb:
> 107:in `connect': NameError uninitialized constant
> Mysql::CLIENT_MULTI_RESULTS (Sequel::DatabaseConnectionError)
You are using the pure ruby mysql.rb driver. Sequel requires the C
based mysql.so driver. You want to gem install mysql (or install from
source), and make sure to remove the mysql.rb file or call gem
('mysql') to force the use of the gem.
This error is common enough that I should write have Sequel check for
it and report a better error.
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
-~----------~----~----~----~------~----~------~--~---