structure of my application:
.
├── config
│   ├── boot.rb
│   └── environment.rb
├── Gemfile
├── Gemfile.lock
├── lib
│   ├── entities
│   │   └── account.rb
│   └── repositories
│       └── account_repository.rb
└── README.md
Gemfile:
source 'https://rubygems.org'
gem 'pg', '~> 1.1'
gem 'dotenv'
gem 'byebug'
gem 'hanami-model'
config/environment.rb:
require 'bundler/setup'
require 'hanami/model'
require 'dotenv/load'
class App
  class << self
    def boot
      Mutex.new.synchronize do
        Hanami::Model.configure do
          adapter :sql, ENV['DATABASE_URL']
        end.load!
      end
    end
  end
end
config/boot.rb:
require_relative './environment'
App.boot
lib/entities/account.rb:
require 'hanami/model'
require_relative '../repositories/account_repository'
class Account < Hanami::Entity
end
lib/repositories/account_repository.rb:
require 'hanami/model'
require_relative '../entities/account'
class AccountRepository < Hanami::Repository
   self.relation = :accounts
end
in the console, I run the following code, and I get an error:
irb -I .
irb(main):001:0> require 'config/boot'
=> true
irb(main):002:0> require 'lib/repositories/account_repository'
=> true
irb(main):003:0> rep = AccountRepository.new
Traceback (most recent call last):
        6: from /home/mvalitov/.asdf/installs/ruby/2.5.1/bin/irb:11:in `<main>'
        5: from (irb):3
        4: from (irb):3:in `new'
        3: from /home/mvalitov/.asdf/installs/ruby/2.5.1/lib/ruby/gems/2.5.0/gems/hanami-model-1.3.2/lib/hanami/repository.rb:420:in `initialize'
        2: from /home/mvalitov/.asdf/installs/ruby/2.5.1/lib/ruby/gems/2.5.0/gems/rom-repository-1.4.0/lib/rom/repository/root.rb:62:in `initialize'
        1: from /home/mvalitov/.asdf/installs/ruby/2.5.1/lib/ruby/gems/2.5.0/gems/rom-3.3.3/lib/rom/registry.rb:30:in `fetch'
ArgumentError (key cannot be nil)
what am I doing wrong? if you put all the entity code and repositories in one file, the code runs without errors.
 
                        
You are missing the "root" configuration/options (I don't know much as I don't use Hanami).
How did I find that?
Looking at the stacktrace:
fetchhas an alias:[](all links to latest because I'm lazy :) )