Suddenly, I'm not able to open the console or anything else related to the ActiveRecord in my app.
I always get this error:
~/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'
I've tried this solution https://rails.lighthouseapp.com/projects/8994/tickets/99-sqlite-connection-failing with no effect.
开发者_如何学PythonWhat am I doing wrong here? Even when I checkout version who used to work from github I get the same error.
Regards, Thanks
Try
rake db:migrate
I am assuming either you started in a new folder, or you added a new migration. The error states clearly that the table wsps
cannot be found.
精彩评论