実行中の.rbファイルがある階層ディレクトリのフルパスを取得する
File.dirname(File.expand_path(__FILE__)) # 1つ上の階層のディレクトリを取得する場合 File.dirname(File.expand_path('../', __FILE__))