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:
parent
05337f61f9
commit
db28d407f7
1 changed files with 5 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue