From a technical point of view, you do not need a file, you need a function.
If you submit the full path to the required call (e.g. require '/home/users/kerrick/my_lib/utils'
), it will load the file /home/users/kerrick/my_lib/utils.rb
(either .so
or .dll
or .bundle
).
If you do not specify the full path, Ruby will look in your boot path in the order specified by ruby -e 'puts $:'
on UNIX command line.
Also, keep in mind that if you need to do something more than once, it will download only once.
source share