2011-11-16發表2023-12-05更新Program幾秒讀完 (大約41個字)Get gem path取得Gem環境資訊1$ gem env 取得正在引入gem資訊1234require 'rubygems'require 'cucumber'gem_root = Gem.loaded_specs['cucumber'].full_gem_pathgem_lib = File.join(gem_root, 'lib') Get gem pathhttps://andyyou.github.io/2011/11/16/find-gem-path/作者andyyou(YOU,ZONGYAN)發表於2011-11-16更新於2023-12-05許可協議#ruby