简体   繁体   中英

Ruby on rails Resque db connection error while starting queue

while i try to start resque queue by rake resque:work QUEUE='*' i am getting "database configuration does not specify adapter" error. db connection is okay i guess because it can fetch data and shows in index page. and ... there are queued tasks i can see in ~/resque/overview but it doesn't executes.

the full error msg is:

Initializing connection to redis...
Done (port = 6392)!
Configuring resque sheduler... 
Resque scheduler configured
rake aborted!
database configuration does not specify adapter
/home/woody/.rvm/gems/ruby-1.8.7-p371/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:47:in `resolve_hash_connection'
/home/woody/.rvm/gems/ruby-1.8.7-p371/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:41:in `resolve_string_connection'
/home/woody/.rvm/gems/ruby-1.8.7-p371/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:27:in `spec'
/home/woody/.rvm/gems/ruby-1.8.7-p371/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:130:in `establish_connection'
/home/woody/Workspace/IDP/Amigos/app/models/ak.rb:2
/home/woody/.rvm/gems/ruby-1.8.7-p371/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:469:in `load'
/home/woody/.rvm/gems/ruby-1.8.7-p371/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:469:in `load_file'
/home/woody/.rvm/gems/ruby-1.8.7-p371/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:639:in `new_constants_in'
/home/woody/.rvm/gems/ruby-1.8.7-p371/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:468:in `load_file'
/home/woody/.rvm/gems/ruby-1.8.7-p371/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:353:in `require_or_load'
/home/woody/.rvm/gems/ruby-1.8.7-p371/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:313:in `depend_on'
/home/woody/.rvm/gems/ruby-1.8.7-p371/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:225:in `require_dependency'
/home/woody/.rvm/gems/ruby-1.8.7-p371/gems/railties-3.2.13/lib/rails/engine.rb:439:in `eager_load!'
/home/woody/.rvm/gems/ruby-1.8.7-p371/gems/railties-3.2.13/lib/rails/engine.rb:438:in `each'
/home/woody/.rvm/gems/ruby-1.8.7-p371/gems/railties-3.2.13/lib/rails/engine.rb:438:in `eager_load!'
/home/woody/.rvm/gems/ruby-1.8.7-p371/gems/railties-3.2.13/lib/rails/engine.rb:436:in `each'
/home/woody/.rvm/gems/ruby-1.8.7-p371/gems/railties-3.2.13/lib/rails/engine.rb:436:in `eager_load!'
/home/woody/.rvm/gems/ruby-1.8.7-p371/gems/resque-1.24.1/lib/resque/tasks.rb:61
/home/woody/.rvm/gems/ruby-1.8.7-p371/bin/ruby_noexec_wrapper:14
Tasks: TOP => resque:work => resque:preload
(See full trace by running task with --trace)

Based on the contents of the error message, can you verify what your database.yml file looks like? Does each environment have an associated adapter (such as sqlite3, mysql2, etc.)?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM