簡體   English   中英

啟動隊列時Ruby on Rails Resque db連接錯誤

[英]Ruby on rails Resque db connection error while starting queue

當我嘗試通過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)

根據錯誤消息的內容,您可以驗證database.yml文件的外觀嗎? 每個環境是否都有關聯的適配器(例如sqlite3,mysql2等)?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM