Create tmp directories if required before starting server [#3907 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
Ravinder Singh
2010-03-31 15:28:48 +05:30
committed by José Valim
parent 05337f61f9
commit db28d407f7

View File

@@ -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.