I'm trying to use the list plugin with Sequel 3.12.1

Here's the code

<<
require 'rubygems'
require 'sequel'

DB = Sequel.sqlite # Create an in-memory database

# Create the books table with a title only.
DB.create_table :books do
    primary_key :id
    column :position, :integer
    column :title, :text, :unique=>true
end

# Create the Book model.
class Book < Sequel::Model
    plugin :list # Uses :position field for position
end

# Create a couple of books (odd that we'd use C/Unix books and not Ruby, but
at
# least it's not Rails ;-)) ...
cProgrammingLanguage = Book.create(:title => 'The C Programming Language',
:position => 1)
unixProgrammingEnvironment = Book.create(:title => 'Unix Programming
Environment', :position => 2)
>>

and here's the error I get:

<<
/var/lib/gems/1.9.1/gems/sequel-3.12.1/lib/sequel/core.rb:244:in `require':
no such file to load -- sequel_list (LoadError)
    from /var/lib/gems/1.9.1/gems/sequel-3.12.1/lib/sequel/core.rb:244:in
`block in tsk_require'
    from /var/lib/gems/1.9.1/gems/sequel-3.12.1/lib/sequel/core.rb:86:in
`block in check_requiring_thread'
    from <internal:prelude>:8:in `synchronize'
    from /var/lib/gems/1.9.1/gems/sequel-3.12.1/lib/sequel/core.rb:83:in
`check_requiring_thread'
    from /var/lib/gems/1.9.1/gems/sequel-3.12.1/lib/sequel/core.rb:244:in
`tsk_require'
    from
/var/lib/gems/1.9.1/gems/sequel-3.12.1/lib/sequel/model/plugins.rb:63:in
`rescue in plugin_module'
    from
/var/lib/gems/1.9.1/gems/sequel-3.12.1/lib/sequel/model/plugins.rb:60:in
`plugin_module'
    from
/var/lib/gems/1.9.1/gems/sequel-3.12.1/lib/sequel/model/plugins.rb:31:in
`plugin'
    from BookAuthor.rb:17:in `<class:Book>'
    from BookAuthor.rb:15:in `<main>'

>>

It looks like it can't find the plugin, but I thought this was shipped
automatically. Do I need to require something else? Obviously, I haven't
used plugins before so I'm guessing this is something that's pretty obvious.

Thanks,



-- 
Scott
http://steamcode.blogspot.com/

-- 
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.

Reply via email to