DatabaseCleaner is a library to "clean up" your db. Cucumber will use it between working functions so that your db is in a checked state (i.e. empty).
The idea is that you create the right data in your Given sentences for each test.
This error means that DatabaseCleaner is not required properly.
Different versions of Rails / Cucumber have different ways to configure everything and provide different functionality in this regard, so it is difficult for you to give the right solution without knowing the settings.
A few tips:
Take a look at the cucumber-rails gem. This gives you a lot of nice things, like generators as well as a rake, so you can run rake cucumber instead of using cucumber directly. Often generators will create a configuration file that requires database_cleaner .
Otherwise, add database_cleaner to the dependency list and place require 'database_cleaner' somewhere in your test case code.
brad
source share