or Create a profile
23 Nov, 2010 05:40 PM
I'm building a gem that includes an ERB template. To use this
inside Rails, I need the absolute path to this file.
I don't want to use Gem.required_location because I want the gem
version requirements to live in the initial require.
So far, I've come up with
but is there a better way? It seems like Gem::Specification
should have some method to determine the absolute path to a file
2 Posted by John Barnette on 23 Nov, 2010 05:48 PM
Why are you forcing your code to be in a Gem at all? Since
you're being a good Ruby citizen and putting your templates under
lib, why not figure out the paths relative to
__FILE__ in a helper in the same directory
Formatting help /
(switch to plain text)
(switch to Markdown)
You can attach files up to 10MB
If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.
A conversation has been started with the RubyGems.org staff to resolve this discussion.
This discussion is private.
Only you and RubyGems.org support staff can see and reply to it.
This discussion is public. Everyone can see and reply to it.
You can use Command ⌘ instead of Control ^ on Mac
Powered by Tender™.