RX0633

Domain: Execution

Error message

%s needs a project: %s

In the message, %s marks a value that the engine fills in when it raises the error.

The story

You tried to use a database from a loose script, and rush told you that databases need a project. Let's see why. In rush there are two ways to run code. A loose script is a single file that you run on its own. A project is a directory with a manifest dot rush file, where the project declares its databases, its engine, and its dependencies. A database holder needs those declarations. Where would its file live? Which engine would it use? In a loose script, nobody has said, and rush will not invent answers or quietly store your data somewhere else. So at the birth of the holder, it refuses by name. Notice that holders on the filesystem are different, they are not covered by this rule. The fix is in the second slot of the message. Create a project directory, put a manifest dot rush file in it, move your script inside, and declare the database there. Run it again, and the same holder will have a real home.

Text from the Rush engine's error catalogue.