What's the correct way to find the absolute path to a file from within a gem? In other words, let's say I'm in gem_install_path/mygem/lib/mygem.rb
, and I want the path to gem_install_path/mygem/foo/
. What's the correct way to get that?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…