Help - "Cannot start a transaction within a transaction"

This is my first Rails app, and things are going pretty well with he
exception of an error that seems to be configuration-related.

I’m getting a strange error on my (Railsplayground) deployed app using
fast-cgi, Ruby 1.8.6, Rails 2.02, and sqlite 3.3.6 with sqlite3-ruby
1.2.2. The exception seems to be raised before it gets to my code.
Other parts of the application work fine, including parts that read
and write from the database. It also works fine on my development
machine using the same setup, but in Windows (and development mode
rather than production)
.

Logfile created on Sat Jul 26 18:59:17 -0400 2008

Processing CardsController#index (for 96.252.14.83 at 2008-07-26
18:59:17) [GET]
Session ID: 2b27ab72cff4dd2d83e4c97585743004
Parameters: {“action”=>“index”, “controller”=>“cards”}
Rendering template within layouts/cards
Rendering cards/index
Completed in 0.98825 (1 reqs/sec) | Rendering: 0.68043 (68%) | DB:
0.00000 (0%) | 200 OK

Processing CardsController#index (for 96.252.14.83 at 2008-07-26
18:59:18) [GET]
Session ID: 2b27ab72cff4dd2d83e4c97585743004
Parameters: {“action”=>“index”, “controller”=>“cards”}

SQLite3::SQLException (cannot start a transaction within a
transaction):
/usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.2/lib/sqlite3/
errors.rb:62:in check' /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.2/lib/sqlite3/ resultset.rb:47:incheck’
/usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.2/lib/sqlite3/
resultset.rb:39:in commence' /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.2/lib/sqlite3/ resultset.rb:29:ininitialize’
/usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.2/lib/sqlite3/
statement.rb:135:in new' /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.2/lib/sqlite3/ statement.rb:135:inexecute’
/usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.2/lib/sqlite3/
database.rb:182:in execute' /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.2/lib/sqlite3/ database.rb:157:inprepare’
/usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.2/lib/sqlite3/
database.rb:181:in execute' /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.2/lib/sqlite3/ database.rb:558:intransaction’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/
active_record/connection_adapters/sqlite_adapter.rb:156:in
begin_db_transaction' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/ active_record/connection_adapters/sqlite_adapter.rb:345:incatch_schema_changes’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/
active_record/connection_adapters/sqlite_adapter.rb:156:in
begin_db_transaction' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/ active_record/connection_adapters/abstract/database_statements.rb: 63:intransaction’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/
active_record/transactions.rb:80:in transaction' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/ active_record/transactions.rb:100:intransaction’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/
active_record/transactions.rb:108:in save' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/ active_record/transactions.rb:120:inrollback_active_record_state!’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/
active_record/transactions.rb:108:in save' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/session/active_record_store.rb:310:inupdate’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/
active_record/base.rb:1198:in silence' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/session/active_record_store.rb:310:inupdate’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/session/active_record_store.rb:317:in close' /usr/local/lib/ruby/1.8/cgi/session.rb:324:inclose’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/base.rb:1247:in close_session' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/base.rb:1292:inprocess_cleanup_without_flash’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/flash.rb:173:in
process_cleanup_without_session_management_support' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/session_management.rb:133:inprocess_cleanup_without_components’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/components.rb:161:in process_cleanup' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/base.rb:532:inprocess_without_filters’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/filters.rb:685:in
process_without_session_management_support' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/session_management.rb:123:inprocess’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/base.rb:388:in process' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/dispatcher.rb:171:inhandle_request’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/dispatcher.rb:115:in dispatch' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/dispatcher.rb:126:indispatch_cgi’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/dispatcher.rb:9:in `dispatch’
dispatch.cgi:10

Rendering /home/terron/stagingareas/public/500.html (500 Internal
Server Error)
/!\ FAILSAFE /!\ Sat Jul 26 18:59:18 -0400 2008
Status: 500 Internal Server Error
cannot start a transaction within a transaction
/usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.2/lib/sqlite3/
errors.rb:62:in check' /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.2/lib/sqlite3/ resultset.rb:47:incheck’
/usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.2/lib/sqlite3/
resultset.rb:39:in commence' /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.2/lib/sqlite3/ resultset.rb:29:ininitialize’
/usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.2/lib/sqlite3/
statement.rb:135:in new' /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.2/lib/sqlite3/ statement.rb:135:inexecute’
/usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.2/lib/sqlite3/
database.rb:182:in execute' /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.2/lib/sqlite3/ database.rb:157:inprepare’
/usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.2/lib/sqlite3/
database.rb:181:in execute' /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.2/lib/sqlite3/ database.rb:558:intransaction’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/
active_record/connection_adapters/sqlite_adapter.rb:156:in
begin_db_transaction' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/ active_record/connection_adapters/sqlite_adapter.rb:345:incatch_schema_changes’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/
active_record/connection_adapters/sqlite_adapter.rb:156:in
begin_db_transaction' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/ active_record/connection_adapters/abstract/database_statements.rb: 63:intransaction’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/
active_record/transactions.rb:80:in transaction' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/ active_record/transactions.rb:100:intransaction’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/
active_record/transactions.rb:108:in save' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/ active_record/transactions.rb:120:inrollback_active_record_state!’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/
active_record/transactions.rb:108:in save' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/session/active_record_store.rb:310:inupdate’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/
active_record/base.rb:1198:in silence' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/session/active_record_store.rb:310:inupdate’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/session/active_record_store.rb:317:in close' /usr/local/lib/ruby/1.8/cgi/session.rb:324:inclose’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/base.rb:1247:in close_session' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/base.rb:1292:inprocess_cleanup_without_flash’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/flash.rb:173:in
process_cleanup_without_session_management_support' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/session_management.rb:133:inprocess_cleanup_without_components’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/components.rb:161:in process_cleanup' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/base.rb:532:inprocess_without_filters’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/filters.rb:685:in
process_without_session_management_support' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/session_management.rb:123:inprocess’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/base.rb:388:in process' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/dispatcher.rb:171:inhandle_request’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/dispatcher.rb:115:in dispatch' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/dispatcher.rb:126:indispatch_cgi’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/dispatcher.rb:9:in `dispatch’
dispatch.cgi:10

Thanks,
Lee

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