ruby on rails问题

时间:2010-12-04 18:43:32

标签: ruby-on-rails

我执行了这个功能:

rake db:schema:dump

那是我得到的:

C:\Users\Oded\sites\simple_cms>rake db:schema:dump
(in C:/Users/Oded/sites/simple_cms)
rake aborted!
Mysql::Error: query: not connected: SHOW TABLES
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_record/connec
ion_adapters/abstract_adapter.rb:202:in `rescue in log'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_record/connec
ion_adapters/abstract_adapter.rb:194:in `log'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_record/connec
ion_adapters/mysql_adapter.rb:289:in `execute'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_record/connec
ion_adapters/mysql_adapter.rb:407:in `tables'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_record/schema
dumper.rb:66:in `tables'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_record/schema
dumper.rb:27:in `dump'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_record/schema
dumper.rb:21:in `dump'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_record/railti
s/databases.rake:327:in `block (4 levels) in <top (required)>'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_record/railti
s/databases.rake:326:in `open'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_record/railti
s/databases.rake:326:in `block (3 levels) in <top (required)>'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:634:in `call'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:634:in `block in execute'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:629:in `each'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:629:in `execute'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:595:in `block in invoke_with_call_chain'
C:/Ruby192/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:588:in `invoke_with_call_chain'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:581:in `invoke'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2041:in `invoke_task'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2019:in `block (2 levels) in top_level'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2019:in `each'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2019:in `block in top_level'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2013:in `top_level'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:1992:in `run'
C:/Ruby192/bin/rake:31:in `<main>'    

任何想法是什么问题?

谢谢,

乌迪德

1 个答案:

答案 0 :(得分:1)

检查以确保所有与mysql数据库的连接都是正确的。

第4行有这样的内容:“查询:未连接:SHOW TABLES”

这让我觉得你无法联系。