I see this a lot in many ruby scripts but not sure what it means:
$:.unshift File.dirname(__FILE__)
$: is just a shortcut for $LOAD_PATH. __FILE__ is the relative path to the script. This adds the current script directory to the load path.
$:
$LOAD_PATH
__FILE__
2.1m questions
2.1m answers
60 comments
57.0k users