From 6fc83f8efeb1637af5d17b0d7b0c4b2e3db3c001 Mon Sep 17 00:00:00 2001 From: Yoong Kang Lim Date: Tue, 26 May 2015 20:47:36 +1000 Subject: `rake restart` should work without a `tmp` folder In restart.rake, the creation of tmp/restart.txt would fail if the tmp folder does not exist in the app. This is a problem because apps cloned using git would not have the tmp folder, as the folder is in .gitignore. This commit creates the tmp folder if it does not exist. Fixes #20299 [Yoong Kang Lim, Sunny Juneja] --- railties/lib/rails/tasks/restart.rake | 1 + 1 file changed, 1 insertion(+) (limited to 'railties/lib/rails/tasks') diff --git a/railties/lib/rails/tasks/restart.rake b/railties/lib/rails/tasks/restart.rake index 1e8940b675..f36c86d81b 100644 --- a/railties/lib/rails/tasks/restart.rake +++ b/railties/lib/rails/tasks/restart.rake @@ -1,4 +1,5 @@ desc "Restart app by touching tmp/restart.txt" task :restart do + FileUtils.mkdir_p('tmp') FileUtils.touch('tmp/restart.txt') end -- cgit v1.2.3