Ruby require in local directory

So it turns out that if you require a ruby file that is in your local directory, it doesn’t work. It loads the file and the class names, but leaves out all of the functions, etc.

To get it to work

instead of

require ‘localfile’

require ‘./localfile’ works.

Go figure.

Also note there is a discreapncy between require and load, which is interesting. load _requires_  the “.rb” (at least for me) while require does not. A minor inconsistency.

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.