From: Jean-denis Vauguet Date: 2010-03-23T16:11:01+09:00 Subject: Re: require, from within lib, files located under the local path Ok so here's what I eventually did: require 'pathname' # I love it :) module MyLib def self.extended base #:nodoc: # the receiver is the extended module or class @receiver = base # paths of the receiver file and receiver stuff @base_path = Pathname.new(File.expand_path($0)).dirname @stuff_path = @base_path + "mylib_stuff" # ... do whatever with base and the paths end # ... end I don't know if this practice of relying on $0 is solid, though. Any hint? -- Posted via http://www.ruby-forum.com/.