突然间,我无法在我的应用中打开控制台或与ActiveRecord相关的任何其他内容。
我总是收到这个错误:
~/Code/act(master) $ rails c
/Users/donald/.rvm/gems/ruby-1.9.2-rc2/gems/activerecord-3.0.3/lib/active_record/connection_adapters/sqlite_adapter.rb:295:in `table_structure': Could not find table 'wsps' (ActiveRecord::StatementInvalid)
from /Users/donald/.rvm/gems/ruby-1.9.2-rc2/gems/activerecord-3.0.3/lib/active_record/connection_adapters/sqlite_adapter.rb:186:in `columns'
from /Users/donald/.rvm/gems/ruby-1.9.2-rc2/gems/activerecord-3.0.3/lib/active_record/base.rb:679:in `columns'
from /Users/donald/.rvm/gems/ruby-1.9.2-rc2/gems/activerecord-3.0.3/lib/active_record/base.rb:692:in `column_names'
from /Users/donald/.rvm/gems/ruby-1.9.2-rc2/gems/validates_lengths_from_database-0.1.2/lib/validates_lengths_from_database.rb:20:in `validates_lengths_from_database'
我已经尝试过此解决方案https://rails.lighthouseapp.com/projects/8994/tickets/99-sqlite-connection-failing但没有效果。
我在这里做错了什么?即使我签出以前从github工作的版本我也得到同样的错误。
此致 感谢
答案 0 :(得分:0)
尝试
rake db:migrate
我假设你是在一个新文件夹中开始的,或者你添加了一个新的迁移。该错误清楚地表明无法找到表wsps
。