ActiveRecord::StatementInvalid in DashboardController#index -> Mysql::Error 42S02 Table 'snort.preferences' doesn't exist:

Added by {{author}} {{age}} ago

Hi,

I try the latest version of SAM on Centos 5.4 with snort-2.8.5.1 - I get the following error in my browser:

ActiveRecord::StatementInvalid in DashboardController#index

Mysql::Error: #42S02Table 'snort.preferences' doesn't exist: SELECT * FROM `preferences` LIMIT 1

RAILS_ROOT: /opt/sam
Application Trace | Framework Trace | Full Trace

/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/connection_adapters/abstract_adapter.rb:147:in `log'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/connection_adapters/mysql_adapter.rb:302:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/connection_adapters/mysql_adapter.rb:537:in `select'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all_without_query_cache'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/connection_adapters/abstract/query_cache.rb:59:in `select_all'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/connection_adapters/abstract/query_cache.rb:80:in `cache_sql'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/connection_adapters/abstract/query_cache.rb:59:in `select_all'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/base.rb:586:in `find_by_sql'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/base.rb:1345:in `find_every'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/base.rb:1307:in `find_initial'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/base.rb:538:in `find'
app/controllers/application.rb:26:in `load_preferences'

it seems that is the same like Michales "databse table not found" problem.

regards,
tom


Replies (3)

RE: ActiveRecord::StatementInvalid in DashboardController#index -> Mysql::Error 42S02 Table 'snort.preferences' doesn't exist: - Added by {{author}} {{age}} ago

Hi Tom, did you 'rake db:migrate'? That will create the database tables that are needed for SAM. See my post to Michael for more info.

RE: ActiveRecord::StatementInvalid in DashboardController#index -> Mysql::Error 42S02 Table 'snort.preferences' doesn't exist: - Added by {{author}} {{age}} ago

ahhhhh - "rake db:migrate" solved my problem - thx!

tom

RE: ActiveRecord::StatementInvalid in DashboardController#index -> Mysql::Error 42S02 Table 'snort.preferences' doesn't exist: - Added by {{author}} {{age}} ago

Yeah, sorry about that. It wasn't originally in the install instructions. I added it after I saw the problem you guys were hitting.

(1-3/3)