In Ruby not library management is not always as simple as running gem install
.
Some Ruby code is distributed simply as libraries. So where do you put these libraries? The clue is
in the Ruby $LOAD_PATH
variable.
irb(main):001:0> puts $LOAD_PATH /usr/local/lib/ruby/site_ruby/1.8 /usr/local/lib/ruby/site_ruby/1.8/i686-darwin8.10.1 /usr/local/lib/ruby/site_ruby /usr/local/lib/ruby/1.8 /usr/local/lib/ruby/1.8/i686-darwin8.10.1 . => nil irb(main):002:0>
This tells you that you can put your library code in any of the above listed directories and
if Ruby still can’t find the code it will try the current directory you’re running code in before
giving up.
Personally I end up using the /usr/local/lib/ruby/1.8
folder.