Reputation: 1326
I'm actually writing my own Ruby gem. It is yet not packed and under development.
How can I get the path to the files within the Gem and how can I get the path from where the gem is called from?
Upvotes: 0
Views: 387
Reputation: 23556
To get path where gem is:
File.expand_path(File.join(File.dirname(__FILE__), '..'))
Where gem is called from:
current_dir = Dir.pwd
Upvotes: 1