I'm not much of a Ruby guy, but found how to list the Ruby load path. Here's what it looks like for me
$ ruby -e 'puts $:'
/usr/lib/ruby/site_ruby/1.8
/usr/lib64/ruby/site_ruby/1.8
/usr/lib64/ruby/site_ruby/1.8/x86_64-linux
/usr/lib/ruby/site_ruby
/usr/lib64/ruby/site_ruby
/usr/lib64/site_ruby/1.8
/usr/lib64/site_ruby/1.8/x86_64-linux
/usr/lib64/site_ruby
/usr/lib/ruby/1.8
/usr/lib64/ruby/1.8
/usr/lib64/ruby/1.8/x86_64-linux
Some of these directories don't even exist, and frankly, I'd think custom fact .rb files would be best placed in a Puppet-ish location, like /etc/puppet/facts or similar.
Should I go with one of the existing load path locations or create a new one for purposes of Puppet?
The best practise is to put any facts and other plugins within modules on the puppet server. Then use the pluginsync feature on the client. This lets the puppet client put things in the appropriate location.
http://docs.puppetlabs.com/guides/plugins_in_modules.html
So a new fact might go into
modules/examplemod/lib/facter/myfact.rb
.Since
facter-1.7
there's also the possibility to have external facts, that can be deployed in/etc/facter/facts.d
and can be written in any language.