Skip to content

Instantly share code, notes, and snippets.

@mwunsch
Created May 7, 2009 16:25
Show Gist options
  • Save mwunsch/108192 to your computer and use it in GitHub Desktop.
Save mwunsch/108192 to your computer and use it in GitHub Desktop.
$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