Module File ----------- filename: .rb example: functions.rb Install ------ Copy to lib/site_ruby// example: /your/ruby/1.8.4/lib/ruby/site_ruby/1.8/dev (also: see "Using without Installing" below) Contents -------- #!/usr/bin/env ruby # # # usage: # require 'dev/functions' # include FUNCTIONS # module FUNCTIONS def some_function(argument, ...) ... end module_function :some_function # Makes the fcn visible after "include" # ^^^ You specify a name (a symbol) end Useful Subdirectory Names ------------------------- dev -- development utilities usr -- for individual users in a multi-user setting (ex: usr/eric) Using without Installing ---------------------- Nicholas Sterling provided this option: Put the module in the directory where the script or program is located (for example, ~/bin), and use the code below. My scripts all execute this code--it's in a util.rb file I always require: # Look for other modules in the directory this program was # loaded from. Get the dirname from $0, or . if there is no dir. $LOAD_PATH.push( $0.dup.sub!( %r{/[^/]+$}, '' ) || '.' )