Forum: Ruby Find File No Matter Where Script Has Been Executed

2f034754f0c731c93e5721deeee757b2?d=identicon&s=25 Severen Redwood (insanity133)
on 2014-08-13 11:09
I have the following code:

template = { gemfile:'lib/projectionist/templates/ruby/Gemfile.erb')),\
                     gemspec:'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:
54404bcac0f45bf1c8e8b827cd9bb709?d=identicon&s=25 7stud -- (7stud)
on 2014-08-13 20:13
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.