1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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.