I want to add a library that I wrote to a Rails app (and to other Rails apps later). I tried putting it in /lib
which seemed logical...
[RAILS_ROOT]/lib/my_lib/the_main_file.rb
[RAILS_ROOT]/lib/my_lib/some_other_file.rb
Then...
require 'my_lib/the_main_file'
That works fine.
But is that a great way to do it?
Now I have to put that require
everywhere I want to call the library.
I thought about putting the require
in an initializer but that seems kind of weird.
What do people usually do about this?