0

当我尝试通过rake resque:work QUEUE='*'启动 resque 队列时, 我收到“数据库配置未指定适配器”错误。我猜数据库连接没问题,因为它可以获取数据并显示在索引页面中。并且......我可以在 ~/resque/overview 中看到排队的任务,但它没有执行。

完整的错误消息是:

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)
4

1 回答 1

0

根据错误消息的内容,您能否验证您的database.yml文件是什么样的?每个环境是否都有关联的适配器(如sqlite3、mysql2等)?

于 2013-03-28T15:23:15.163 回答