ruote-sequel is used to connect to sqlite3 used in our rails 3.2.12 app and 
follow the example in ruote-sequel 
https://github.com/jmettraux/ruote-sequel. 

Ruote::Sequel.create_table($sequel, true) is the command creating the table in 
the db.


In ruote.rb under rails config/initializers, the table ruote_docs will be 
created if the table not existing:

  sequel = Sequel.connect('sqlite://development') if Rails.env.development? 
  sequel = Sequel.connect('sqlite://test') if Rails.env.test?
  sequel = Sequel.connect('sqlite://ruote_in_rail') if Rails.env.production?

  #ruote_docs is the table name
  opts = { 'sequel_table_name' => 'ruote_docs' }
  #create ruote_docs table if it is not existing
  Ruote::Sequel.create_table(sequel, true) unless 
ActiveRecord::Base.connection.table_exists? 'ruote_docs'
  RUOTE_STORAGE = Ruote::Sequel::Storage.new(sequel, opts)

However, RUOTE_STORAGE = Ruote::Sequel::Storage.new(sequel, opts) causes 
error: 

  
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sqlite3-1.3.7-x86-mingw32/lib/sqlite3/database.rb:91:in
 
`initialize': SQLite3::SQLException: no such table: ruote_
  docs (Sequel::DatabaseError)

Why Ruote::Sequel.create_table($sequel, true) did not create the table? 
Thanks for help.

-- 
-- 
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"ruote" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to