The $LOAD_PATH is a global Ruby variable that holds an array of strings which are directories where Ruby searches for files when using the require method.

When you use require to load a Ruby file or a library, Ruby looks in each directory specified in the $LOAD_PATH array to find the file.

Here is an example one:

pp $LOAD_PATH
["/Users/dragonastronauts/.rvm/gems/ruby-3.2.2/gems/timeout-0.3.2/lib",
 "/Users/dragonastronauts/.rvm/gems/ruby-3.2.2/gems/rdoc-6.5.0/lib",
 "/Users/dragonastronauts/.rvm/rubies/ruby-3.2.2/lib/ruby/site_ruby/3.2.0",
 "/Users/dragonastronauts/.rvm/rubies/ruby-3.2.2/lib/ruby/site_ruby/3.2.0/x86_64-darwin22",
 "/Users/dragonastronauts/.rvm/rubies/ruby-3.2.2/lib/ruby/site_ruby",
 "/Users/dragonastronauts/.rvm/rubies/ruby-3.2.2/lib/ruby/vendor_ruby/3.2.0",
 "/Users/dragonastronauts/.rvm/rubies/ruby-3.2.2/lib/ruby/vendor_ruby/3.2.0/x86_64-darwin22",
 "/Users/dragonastronauts/.rvm/rubies/ruby-3.2.2/lib/ruby/vendor_ruby",
 "/Users/dragonastronauts/.rvm/rubies/ruby-3.2.2/lib/ruby/3.2.0",
 "/Users/dragonastronauts/.rvm/rubies/ruby-3.2.2/lib/ruby/3.2.0/x86_64-darwin22"]