2014-03-23 Dir.chdirについて rails server コマンド の ソース をおっていたら、Dir.chdirという関数があった。 Dir.chdir(File.expand_path('../../', APP_PATH)) unless File.exists?(File.expand_path("config.ru")) 現在のパス上に「config.ru」がなければ、current path を引数の所に変更してくれる。まぁなんて便利な関数!