You can try making any *.rb file in config/initializers (these file
are autoloaded when starting server).
Yo can make any *.rb file in lib directory and require it within
environment.rb
You can also make a plugin in which you will have only init.rb with
"require 'xxx'" inside and lib directory with xxx.rb (and code
inside).
In my solution I have a separate plugin in which I've extracted DRYML
part of hobo and have those overrides loaded AFTER hobo dryml libs.