Relation doesn't exist in ROM::RelationRegistry registry

Welcome, @joeradtke

I believe this might be the problem. You can either automatically register relations by convention, or you can manually register them, but you have to choose one or the other.

config.relation is for manual registration, such as:

config.relation :users do
  schema :users, infer: true
end

Whereas, later in your example you have

This indicates to me that you should have class-based relations located in `lib/trial3/persistence’

# lib/trial3/persistence/relations/users.rb

module Trial3
  module Persistence
    module Relations
      class Users < ROM::Relation[:sql]
        schema :users, infer: true
      end
    end
  end
end

I suggest removing config.relation(:users) and seeing if that helps, however I will echo Tim’s advice and say that the 2.2 release will make this substantially easier to setup.