diff options
author | Ravinder Singh <ravinderrana30@gmail.com> | 2010-03-31 15:28:48 +0530 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-03-31 16:02:59 +0200 |
commit | db28d407f76a790a31e27bf51560e23425dd6944 (patch) | |
tree | d2ec54bf12b295843b9209b17dc785676c728f99 /railties | |
parent | 05337f61f93d4b28fea2cb269483aff0fa4f2545 (diff) | |
download | rails-db28d407f76a790a31e27bf51560e23425dd6944.tar.gz rails-db28d407f76a790a31e27bf51560e23425dd6944.tar.bz2 rails-db28d407f76a790a31e27bf51560e23425dd6944.zip |
Create tmp directories if required before starting server [#3907 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/commands/server.rb | 5 |
1 files changed, 5 insertions, 0 deletions
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. |