Ever wonder why you need to write something like this to require file?
Even thought there is no '.rb' in the end, it is pretty explicit path.
To make it shorter and more 'native' use following string:
$: << File.expand_path(File.dirname(__FILE__) + “/../lib”)
Now you can write only:
Even though it is short path, it have some downsides to it:
- Need to track directories automatically
- Polluting require path is slowing down require time