Rails tests do not work with Sqlite3

It seems I am getting a strange error when I run my tests on rails, they all do not work for the same reason, and none of the online documentation seems particularly useful in relation to this particular error:

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

This error gives rise to my ability to test my application and seems to have appeared suddenly. I have the latest sqlite3 version (3.6.2), the latest sqlite3-ruby stone (1.2.4) and the latest rails (2.1.1).

+3
source share
4 answers

Check out http://dev.rubyonrails.org/ticket/4403 , which shows a workaround. Could this be the problem you are facing?

+1
source

I had this problem once, but with MySQL. It turned out that I did not create a test database. Doh! Rails and sqlite automatically create them, I reckon (at least it does on Windows).

Are they trying to test memory? If the test database database does not exist?

0
source

Hi guys, thanks for the help, I actually just deleted the rails folder and returned the last working copy from version control. I made identical changes, and this problem did not appear, so either I messed up or the rails had some hiccups. Fortunately, I had version control :-)

0
source

I got this error when running a test with the last statement, which is a click on the form submission. As soon as I made a statement or had to check, the test closed properly and I did not have to re-run the db: test rake: prepare

0
source

All Articles