Very lost with rubygems and required files


#1

hi everyone,
a few hours ago, i successfully packed my first gem.
however, my gem uses certain .png images.
when somebody requires my gem, i want the images to be loaded from /images/
but as the file that is required is located in /lib/ , the
images are loaded from …/images/
how can i setup the gem or the required file, so that the files will be
loaded from the proper directory?
greetings, Dirk.


#2

On Tue, 2006-04-18 at 01:56 +0900, Dirk M. wrote:

hi everyone,
a few hours ago, i successfully packed my first gem.
however, my gem uses certain .png images.
when somebody requires my gem, i want the images to be loaded from /images/
but as the file that is required is located in /lib/ , the
images are loaded from …/images/
how can i setup the gem or the required file, so that the files will be
loaded from the proper directory?
greetings, Dirk.

Could you use something like:

PNGPATH = File.join(File.dirname(__FILE__), '../images/')

in your main require file?