Find File No Matter Where Script Has Been Executed

I have the following code:

template = { gemfile:
ERB.new(File.read(‘lib/projectionist/templates/ruby/Gemfile.erb’)),
rakefile:
ERB.new(File.read(‘lib/projectionist/templates/ruby/Rakefile.erb’)),
gemspec:
ERB.new(File.read(‘lib/projectionist/templates/ruby/Gemspec.erb’)) }

This works great when I execute it from the base project directory,
however when I run my RSpec specs or run it from another directory or as
a RubyGem it cannot find the files. How would I write this code so that
it would always find the file no matter what? (use FILE in
conjuction with something else…?)

Here is an upload of my entire project: http://tempsend.com/9CEC93CDCD