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__
1.4m articles
1.4m replys
5 comments
57.0k users