I wanted to load models from a Rails app in a background worker. First attempt
was to require_relative "../config/environment"
, which brings in the whole
app. This works fine, but is quite slow.
I get easily annoyed and frustrated with slow software, so I wanted to find a way to load the models I needed, without pulling in the whole app. The approach here is where I landed.