ActiveRecord::StatementInvalid error

When I try to run my webserver in the production environment I just
get an application error message. This is all I can find in the log:
ActiveRecord::StatementInvalid
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.1/lib/active_record/
connection_adapters/sqlite_adapter.rb:274:in table_structure' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/ core_ext/object/misc.rb:23:inreturning’
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.1/lib/active_record/
connection_adapters/sqlite_adapter.rb:273:in table_structure' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.1/lib/active_record/ connection_adapters/sqlite_adapter.rb:210:incolumns’
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.1/lib/active_record/
base.rb:760:in columns' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.1/lib/active_record/ base.rb:768:incolumns_hash’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/
session/active_record_store.rb:105:in setup_sessid_compatibility! ' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/ session/active_record_store.rb:79:infind_by_session_id’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/
session/active_record_store.rb:283:in initialize' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.1/lib/active_record/ base.rb:864:insilence’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/
session/active_record_store.rb:283:in initialize' /usr/lib/ruby/1.8/cgi/session.rb:273:ininitialize’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/
cgi_process.rb:122:in session' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/ cgi_process.rb:154:instale_session_check!’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/
cgi_process.rb:109:in session' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/ base.rb:1052:inassign_shortcuts_without_flash’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/
flash.rb:140:in assign_shortcuts' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/ base.rb:424:inprocess_without_filters’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/
filters.rb:624:in process_without_session_management_support' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/ session_management.rb:114:inprocess’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/
base.rb:330:in process' /usr/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/dispatcher.rb:41:indispatch’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/fcgi_handler.rb:168:in
process_request' /usr/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/fcgi_handler.rb:143:inprocess_each_request!’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/fcgi_handler.rb:109:in
with_signal_handler' /usr/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/fcgi_handler.rb:142:inprocess_each_request!’
/usr/lib/ruby/1.8/fcgi.rb:600:in each_cgi' /usr/lib/ruby/1.8/fcgi.rb:597:ineach_cgi’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/fcgi_handler.rb:141:in
process_each_request!' /usr/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/fcgi_handler.rb:55:inprocess!’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/fcgi_handler.rb:25:in
process!' /usr/local/code/ruby/coverage-prod/public/dispatch.fcgi:24 ActiveRecord::StatementInvalid /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.1/lib/active_record/ connection_adapters/sqlite_adapter.rb:274:intable_structure’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/
core_ext/object/misc.rb:23:in returning' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.1/lib/active_record/ connection_adapters/sqlite_adapter.rb:273:intable_structure’
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.1/lib/active_record/
connection_adapters/sqlite_adapter.rb:210:in columns' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.1/lib/active_record/ base.rb:760:incolumns’
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.1/lib/active_record/
base.rb:768:in columns_hash' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/ session/active_record_store.rb:105:insetup_sessid_compatibility!

/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/
session/active_record_store.rb:79:in find_by_session_id' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/ session/active_record_store.rb:283:ininitialize’
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.1/lib/active_record/
base.rb:864:in silence' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/ session/active_record_store.rb:283:ininitialize’
/usr/lib/ruby/1.8/cgi/session.rb:273:in initialize' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/ cgi_process.rb:122:insession’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/
cgi_process.rb:154:in stale_session_check!' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/ cgi_process.rb:109:insession’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/
base.rb:1052:in assign_shortcuts_without_flash' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/ flash.rb:140:inassign_shortcuts’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/
base.rb:424:in process_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/ filters.rb:624:inprocess_without_session_management_support’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/
session_management.rb:114:in process' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/ base.rb:330:inprocess’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/dispatcher.rb:41:in
dispatch' /usr/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/fcgi_handler.rb:168:inprocess_request’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/fcgi_handler.rb:143:in
process_each_request!' /usr/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/fcgi_handler.rb:109:inwith_signal_handler’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/fcgi_handler.rb:142:in
process_each_request!' /usr/lib/ruby/1.8/fcgi.rb:600:ineach_cgi’
/usr/lib/ruby/1.8/fcgi.rb:597:in each_cgi' /usr/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/fcgi_handler.rb:141:inprocess_each_request!’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/fcgi_handler.rb:55:in
process!' /usr/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/fcgi_handler.rb:25:inprocess!’
/usr/local/code/ruby/coverage-prod/public/dispatch.fcgi:24

How can I debug this? Is there some way to figure out what the invalid
statement is?

go into config/environment.rb and uncomment the line

config.log_level = :debug

then restart

don’t forget to comment it and restart again after you’ve fixed the
problem.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs