Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
$LOAD_PATH
# These two lines of code kind of do the same thing.
# They both add the directory of the file the Ruby interpreter
# is currently executing to the Load Path.
# Useful when no gem is installed.
$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__))) unless $LOAD_PATH.include?(File.expand_path(File.dirname(__FILE__)))
$:.unshift File.dirname(__FILE__)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment