GEM Preparation
Preparation (One-time process)¶
-
The GEM CLI, heavily used during development, is currently named "gem", which is unfortunate for Ruby developers. If you have the Ruby gem installed on your system, you will have to deal with the ambiguity. For practical reasons, we will rename the GEM CLI to something else relatively soon.
-
If you have previously installed the executables/scripts, make sure to delete them instead of just copying the new ones on top of the same location. During development, the directories are often reorganized and files renamed, and it will cause confusion if you overlay the new version on the old one.
-
The first time you run the gem-server on any machine, you will need to initialize the config file:
-
run
gem-server siterunner --init
Note If you do not initialize, you will be prompted to do so. -
edit the following file:
~/.config/gem/gem-server.json- Insert the correct PostgreSQL connection string
- Choose a schema name
Example:
{
"db": "<postgreSQL_connectionString>",
"schema": "<schemaName>"
}
-
The .config/gem/gem-server.json file defines the schema name, which serves as an isolated namespace in the database. This allows multiple configurations to remain active and enables seamless switching between them. The production schema, named "gem", is the default for deployment. If multiple users are testing on the same PostgreSQL server, each should specify a unique schema name to avoid conflicts.
-
A PostgreSQL server must be running for GEM to function. It does not need to be on the same machine or network as GEM—our setup runs in the cloud with acceptable performance. If you already have a PostgreSQL server available, you can likely use it. We are using PostgreSQL 16, but any modern version should be compatible. The schema-based configuration ensures that multiple users can perform independent testing without interfering with each other's work.