2013-06-18 39 views
0

我想上安裝MSSQL 2005年rails_admin的Rails 3.2.12 + rails_admin =數據庫配置不指定適配器問題

Rails 3.2.12 
ruby 1.9.3 
tiny_tds (0.5.1-x86-mingw32) 
activerecord-sqlserver-adapter (~> 3.2.0) 

軌摹rails_admin:安裝給我一個錯誤:

c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.12/lib/active_record/c 
onnection_adapters/abstract/connection_specification.rb:47:in `resolve_hash_conn 
ection': database configuration does not specify adapter (ActiveRecord::AdapterN 
otSpecified) 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.12/lib/ac 
tive_record/connection_adapters/abstract/connection_specification.rb:41:in `reso 
lve_string_connection' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.12/lib/ac 
tive_record/connection_adapters/abstract/connection_specification.rb:27:in `spec 
' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.12/lib/ac 
tive_record/connection_adapters/abstract/connection_specification.rb:130:in `est 
ablish_connection' 
     from d:/sites/efiling2/app/models/maininfo.rb:2:in `<class:Maininfo>' 
     from d:/sites/efiling2/app/models/maininfo.rb:1:in `<top (required)>' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/a 
ctive_support/dependencies.rb:469:in `load' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/a 
ctive_support/dependencies.rb:469:in `block in load_file' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/a 
ctive_support/dependencies.rb:639:in `new_constants_in' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/a 
ctive_support/dependencies.rb:468:in `load_file' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/a 
ctive_support/dependencies.rb:353:in `require_or_load' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/a 
ctive_support/dependencies.rb:502:in `load_missing_constant' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/a 
ctive_support/dependencies.rb:192:in `block in const_missing' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/a 
ctive_support/dependencies.rb:190:in `each' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/a 
ctive_support/dependencies.rb:190:in `const_missing' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/a 
ctive_support/inflector/methods.rb:230:in `block in constantize' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/a 
ctive_support/inflector/methods.rb:229:in `each' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/a 
ctive_support/inflector/methods.rb:229:in `constantize' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/a 
ctive_support/core_ext/string/inflections.rb:54:in `constantize' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/rails_admin-0.4.9/lib/rail 
s_admin/abstract_model.rb:18:in `new' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/rails_admin-0.4.9/lib/rail 
s_admin/abstract_model.rb:12:in `block in all' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/rails_admin-0.4.9/lib/rail 
s_admin/abstract_model.rb:12:in `map' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/rails_admin-0.4.9/lib/rail 
s_admin/abstract_model.rb:12:in `all' 
     from (erb):30:in `template' 
     from c:/ruby/Ruby193/lib/ruby/1.9.1/erb.rb:838:in `eval' 
     from c:/ruby/Ruby193/lib/ruby/1.9.1/erb.rb:838:in `result' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/actio 
ns/file_manipulation.rb:117:in `block in template' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/actio 
ns/create_file.rb:54:in `call' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/actio 
ns/create_file.rb:54:in `render' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/actio 
ns/create_file.rb:47:in `identical?' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/actio 
ns/create_file.rb:73:in `on_conflict_behavior' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/actio 
ns/empty_directory.rb:114:in `invoke_with_conflict_check' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/actio 
ns/create_file.rb:61:in `invoke!' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/actio 
ns.rb:95:in `action' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/actio 
ns/create_file.rb:26:in `create_file' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/actio 
ns/file_manipulation.rb:116:in `template' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/rails_admin-0.4.9/lib/gene 
rators/rails_admin/install_generator.rb:69:in `install' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/comma 
nd.rb:27:in `run' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/invoc 
ation.rb:120:in `invoke_command' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/invoc 
ation.rb:127:in `block in invoke_all' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/invoc 
ation.rb:127:in `each' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/invoc 
ation.rb:127:in `map' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/invoc 
ation.rb:127:in `invoke_all' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/group 
.rb:233:in `dispatch' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/base. 
rb:439:in `start' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.12/lib/rails/ 
generators.rb:171:in `invoke' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.12/lib/rails/ 
commands/generate.rb:12:in `<top (required)>' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/a 
ctive_support/dependencies.rb:251:in `require' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/a 
ctive_support/dependencies.rb:251:in `block in require' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/a 
ctive_support/dependencies.rb:236:in `load_dependency' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/a 
ctive_support/dependencies.rb:251:in `require' 
     from c:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.12/lib/rails/ 
commands.rb:29:in `<top (required)>' 
     from script/rails:6:in `require' 
     from script/rails:6:in `<main>' 

的database.yml

development: 
    adapter: sqlserver 
    host: 10.11.10.56 
    database: efiling 
    username: ndcpe 
    encoding: utf8 

production: 
    adapter: sqlserver 
    host: 10.10.16.4 
    database: efiling 
    username: ndcpe 
    encoding: utf8 

test: 
    adapter: sqlserver 
    host: 10.11.10.56 
    database: efiling 
    username: ndcpe 
    encoding: utf8 

earchive_database: 
    adapter: sqlserver 
    host: 10.10.16.4 
    database: Inet_Data_Docs 
    username: ndcpe 
    encoding: utf8 

cucumber: 
    adapter: sqlserver 
    host: 10.11.10.56 
    database: efiling 
    username: ndcpe 
    encoding: utf8 

它不清楚爲什麼當適配器規範存在時出現此錯誤?

+0

你可以試試rails g rails_admin:安裝development –

+0

它不會幫助我。 Rails_admin將「開發」視爲管理模型名稱。 –

+0

其實我試圖產生你的錯誤,它不應該拋出這個錯誤,因爲你指定你的適配器 –

回答

0

我發現了錯誤的原因。有一個模型在數據庫中沒有表格。 但rails_admin沒有給我任何關於這方面的信息。

相關問題