From db28d407f76a790a31e27bf51560e23425dd6944 Mon Sep 17 00:00:00 2001 From: Ravinder Singh Date: Wed, 31 Mar 2010 15:28:48 +0530 Subject: Create tmp directories if required before starting server [#3907 state:resolved] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- railties/lib/rails/commands/server.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'railties') diff --git a/railties/lib/rails/commands/server.rb b/railties/lib/rails/commands/server.rb index c57660c0d1..3f74cd49fc 100644 --- a/railties/lib/rails/commands/server.rb +++ b/railties/lib/rails/commands/server.rb @@ -54,6 +54,11 @@ module Rails trap(:INT) { exit } puts "=> Ctrl-C to shutdown server" unless options[:daemonize] + #Create required tmp directories if not found + %w(cache pids sessions sockets).each do |dir_to_make| + FileUtils.mkdir_p(Rails.root.join('tmp', dir_to_make)) + end + super ensure # The '-h' option calls exit before @options is set. -- cgit v1.2.3