Ruby require 'file' doesn't work but require './file' does. Why? -


I have a folder full of ruby ​​files, and when I try a file and a file is required The file that is in the same directory requires the 'file' I get the LoadError , but when I need the then '.file' Everything works fine. Someone can tell me why this is and if there is any other way, then when I add a ./ file to a file May be required?

(Image of directory): alt text

< P>

Expect $ LOAD_PATH if you do not want any file from on system , But relative to the file's directory you need ing to , you should use. (Which, as you can see, is not properly documented massively ).


Comments