There are a lot of threads on here about this already I know but none of the titles have this worded exactly like I did. I hope that we can clear this up a bit.
$:.unshift(File.expand_path("../../lib", __FILE__))
You see something like this in a lot of Ruby code. Opinions vary whether this is proper or not.
Can we get a little explaination for each of its parts? There realy is a lot going on here. I only understand some of it.
$:holds Load path for scripts and binary modules by load or require. . AndArray#unshiftwill prepend the new path to$:.File#expand_pathConverts a pathname to an absolute pathname.__FILE__is already answered hereWhat does __FILE__ mean in Ruby?.