Posted about 9 years ago. Visible to the public.

Mysql::Error: SAVEPOINT active_record_1 does not exist: ROLLBACK TO SAVEPOINT active_record_1 (ActiveRecord::StatementInvalid)

Possible Reason 1: parallel_tests - running more processes than features

If you run old versions of parallel_tests with more processes than you have Cucumber features, you will get errors like this in unexpected places:

This is a bug caused by multiple processes running the same features on the same database.

The bug is fixed in versions 0.6.18+.

Possible Reason 2: You are running parallel tests but you are using an (probably old) database.yml which is not setup for parallel tests.

Checkout the card below to see how to set it up properly:

How to run your tests in parallel to speed up test execution

Possible Reason 3: (Tests) You are using database_cleaner with the :transaction strategy, while use_transactional_fixtures is true

Turn transactional fixtures off -- database_cleaner will take care of this. See How to set up database_cleaner for Rails with Cucumber and RSpec.

Does your version of Ruby on Rails still receive security updates?
Rails LTS provides security patches for old versions of Ruby on Rails (3.2 and 2.3).

Owner of this card:

Henning Koch
Last edit:
about 6 years ago
by Dominik Schöler
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Henning Koch to makandra dev
This website uses short-lived cookies to improve usability.
Accept or learn more