In Ruby, I have been told that when doing
require "some_file"
Ruby will look for the file in certain places.
I know that it looks for some_file.rb
, but where does it look for it by default?
It depends on your platform, and how Ruby was compiled, so there is no "the" answer to this. You can find out by running:
ruby -e 'puts $:'
Generally, though, you have the standard, site, and vendor Ruby library paths, including an arch, version, and general directory under each.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With