I am using Padrino, and one of my tables in the db is called 'classes', but 
Class is already taken in Ruby so I did this:

class FitnessClass < Sequel::Model(:classes); end

The moment I do that though the Padrino rake sq:create command falls over 
with the following error:

lee@lee-W150HNM-W170HN ~/Code/mobi_fit $ rake sq:create
rake aborted!
PG::ConnectionBad: FATAL:  database "mobi_fit_development" does not exist
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sequel-4.4.0/lib/sequel/adapters/postgres.rb:216:in
 
`initialize'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sequel-4.4.0/lib/sequel/adapters/postgres.rb:216:in
 
`new'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sequel-4.4.0/lib/sequel/adapters/postgres.rb:216:in
 
`connect'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sequel-4.4.0/lib/sequel/connection_pool.rb:96:in
 
`make_new'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sequel-4.4.0/lib/sequel/connection_pool/threaded.rb:158:in
 
`make_new'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sequel-4.4.0/lib/sequel/connection_pool/threaded.rb:137:in
 
`available'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sequel-4.4.0/lib/sequel/connection_pool/threaded.rb:127:in
 
`block in acquire'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sequel-4.4.0/lib/sequel/connection_pool/threaded.rb:194:in
 
`block in sync'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sequel-4.4.0/lib/sequel/connection_pool/threaded.rb:194:in
 
`synchronize'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sequel-4.4.0/lib/sequel/connection_pool/threaded.rb:194:in
 
`sync'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sequel-4.4.0/lib/sequel/connection_pool/threaded.rb:126:in
 
`acquire'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sequel-4.4.0/lib/sequel/connection_pool/threaded.rb:94:in
 
`hold'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sequel-4.4.0/lib/sequel/database/connecting.rb:229:in
 
`synchronize'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sequel-4.4.0/lib/sequel/adapters/shared/postgres.rb:439:in
 
`server_version'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sequel-4.4.0/lib/sequel/adapters/shared/postgres.rb:1462:in
 
`server_version'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sequel-4.4.0/lib/sequel/adapters/shared/postgres.rb:1422:in
 
`select_clause_methods'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sequel-4.4.0/lib/sequel/dataset/sql.rb:824:in
 
`clause_sql'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sequel-4.4.0/lib/sequel/dataset/sql.rb:134:in
 
`select_sql'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sequel-4.4.0/lib/sequel/dataset/actions.rb:143:in
 
`each'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sequel-4.4.0/lib/sequel/dataset/actions.rb:393:in
 
`map'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sequel-4.4.0/lib/sequel/dataset/actions.rb:393:in
 
`map'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sequel-4.4.0/lib/sequel/adapters/shared/postgres.rb:997:in
 
`schema_parse_table'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sequel-4.4.0/lib/sequel/database/query.rb:158:in
 
`schema'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sequel-4.4.0/lib/sequel/model/base.rb:707:in
 
`block in get_db_schema'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sequel-4.4.0/lib/sequel/model/base.rb:624:in
 
`check_non_connection_error'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sequel-4.4.0/lib/sequel/model/base.rb:707:in
 
`get_db_schema'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sequel-4.4.0/lib/sequel/model/base.rb:524:in
 
`block in set_dataset'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sequel-4.4.0/lib/sequel/model/base.rb:624:in
 
`check_non_connection_error'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sequel-4.4.0/lib/sequel/model/base.rb:524:in
 
`set_dataset'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sequel-4.4.0/lib/sequel/model.rb:46:in 
`Model'
/home/lee/Code/mobi_fit/models/mobi_fit_class.rb:1:in `<top (required)>' 
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<, Here is the first 
indication of the error (to me at least) 
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/padrino-core-0.11.4/lib/padrino-core/reloader.rb:137:in
 
`require'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/padrino-core-0.11.4/lib/padrino-core/reloader.rb:137:in
 
`safe_load'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/padrino-core-0.11.4/lib/padrino-core/loader.rb:165:in
 
`block in require_dependencies'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/padrino-core-0.11.4/lib/padrino-core/loader.rb:163:in
 
`each'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/padrino-core-0.11.4/lib/padrino-core/loader.rb:163:in
 
`require_dependencies'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/padrino-core-0.11.4/lib/padrino-core/loader.rb:72:in
 
`block in load!'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/padrino-core-0.11.4/lib/padrino-core/loader.rb:72:in
 
`each'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/padrino-core-0.11.4/lib/padrino-core/loader.rb:72:in
 
`load!'
/home/lee/Code/mobi_fit/config/boot.rb:67:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/padrino-core-0.11.4/lib/padrino-core/cli/rake_tasks.rb:12:in
 
`require'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/padrino-core-0.11.4/lib/padrino-core/cli/rake_tasks.rb:12:in
 
`block in <top (required)>'
/usr/local/rvm/gems/ruby-2.0.0-p247@global/bin/ruby_executable_hooks:15:in 
`eval'
/usr/local/rvm/gems/ruby-2.0.0-p247@global/bin/ruby_executable_hooks:15:in 
`<main>'

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

Reply via email to