Eric Scrivner Eric Scrivner - 19 days ago 8
Ruby Question

Rails Tests Fail With Sqlite3

I seem to be getting a strange error when I run my tests in rails, they are all failing for the same reason and none of the online documentation seems particularly helpful in regards to this particular error:

SQLite3::SQLException: cannot rollback - no transaction is active


This error is crippling my ability to test my application and seems to have appeared suddenly. I have the latest version of sqlite3 (3.6.2), the latest sqlite3-ruby (1.2.4) gem and the latest rails (2.1.1).

Answer

Check http://dev.rubyonrails.org/ticket/4403 which shows a workaround. Could that be the problem you are encountering?