Yeah, sqlite3 rather than sqlite3-ruby - that was it.  Some type of
warning/gem check would be cool.  Thanks.

On Mar 3, 5:01 pm, Jeremy Evans <[email protected]> wrote:
> On Mar 3, 12:22 pm, Nate Wiger <[email protected]> wrote:
>
>
>
> > I'm trying to use regular migrations in a project with Sequel 3.8.0.
> > I'm getting a strange error which is non-obvious to me.
>
> > First I connect:
>
> > Sequel.extension :migration
> > DB = Sequel.connect(:adapter => 'sqlite', :database => DBFILE)
>
> > The migration is:
>
> > class CreatePosts < Sequel::Migration
> >   def up
> >     create_table :posts do
> >       primary_key :id
> >       String :title
> >       String :tags
> >       Integer :type_id
> >     end
> >   end
>
> >   def down
> >     drop_table :posts
> >   end
> > end
>
> > Try to run it:
>
> >     CreatePosts.apply(DB, :up)
>
> > But I get:
>
> > NoMethodError: undefined method `type_translation=' for
> > #<SQLite3::Database:0x7b6fc0>
> > /Users/nwiger/.gem/ruby/1.9.1/gems/sequel-3.8.0/lib/sequel/adapters/
> > sqlite.rb:33:in `connect'
> > /Users/nwiger/.gem/ruby/1.9.1/gems/sequel-3.8.0/lib/sequel/database.rb:
> > 93:in `block in initialize'
> > /Users/nwiger/.gem/ruby/1.9.1/gems/sequel-3.8.0/lib/sequel/
> > connection_pool.rb:229:in `call'
> > /Users/nwiger/.gem/ruby/1.9.1/gems/sequel-3.8.0/lib/sequel/
> > connection_pool.rb:229:in `make_new'
> > /Users/nwiger/.gem/ruby/1.9.1/gems/sequel-3.8.0/lib/sequel/
> > connection_pool.rb:203:in `available'
> > /Users/nwiger/.gem/ruby/1.9.1/gems/sequel-3.8.0/lib/sequel/
> > connection_pool.rb:193:in `block in acquire'
> > /Users/nwiger/.gem/ruby/1.9.1/gems/sequel-3.8.0/lib/sequel/
> > connection_pool.rb:267:in `block in sync'
> > <internal:prelude>:8:in `synchronize'
> > /Users/nwiger/.gem/ruby/1.9.1/gems/sequel-3.8.0/lib/sequel/
> > connection_pool.rb:267:in `sync'
> > /Users/nwiger/.gem/ruby/1.9.1/gems/sequel-3.8.0/lib/sequel/
> > connection_pool.rb:192:in `acquire'
> > /Users/nwiger/.gem/ruby/1.9.1/gems/sequel-3.8.0/lib/sequel/
> > connection_pool.rb:139:in `hold'
> > /Users/nwiger/.gem/ruby/1.9.1/gems/sequel-3.8.0/lib/sequel/database.rb:
> > 532:in `synchronize'
> > /Users/nwiger/.gem/ruby/1.9.1/gems/sequel-3.8.0/lib/sequel/adapters/
> > sqlite.rb:93:in `_execute'
> > /Users/nwiger/.gem/ruby/1.9.1/gems/sequel-3.8.0/lib/sequel/adapters/
> > sqlite.rb:68:in `execute_dui'
> > /Users/nwiger/.gem/ruby/1.9.1/gems/sequel-3.8.0/lib/sequel/database.rb:
> > 331:in `execute_ddl'
> > /Users/nwiger/.gem/ruby/1.9.1/gems/sequel-3.8.0/lib/sequel/database/
> > schema_methods.rb:188:in `create_table_from_generator'
> > /Users/nwiger/.gem/ruby/1.9.1/gems/sequel-3.8.0/lib/sequel/database/
> > schema_methods.rb:73:in `create_table'
> > /Users/nwiger/.gem/ruby/1.9.1/gems/sequel-3.8.0/lib/sequel/extensions/
> > migration.rb:87:in `method_missing'
> > /Users/nwiger/Workspace/redis-textsearch/spec/
> > redis_text_search_sequel_spec.rb:40:in `up'
> > /Users/nwiger/.gem/ruby/1.9.1/gems/sequel-3.8.0/lib/sequel/extensions/
> > migration.rb:63:in `apply'
> > /Users/nwiger/Workspace/redis-textsearch/spec/
> > redis_text_search_sequel_spec.rb:74:in `block (2 levels) in <top
> > (required)>'
>
> > Ideas?
>
> Do you have sqlite3-ruby installed, or sqlite3 (they are very
> different gems)?  Sequel requires sqlite3-ruby.  I probably should add
> a warning similar to what we do in the mysql adapter.
>
> 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.

Reply via email to