Skip to content
This repository
Browse code

Create tmp directories if required before starting server [#3907 stat…

…e:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
commit db28d407f76a790a31e27bf51560e23425dd6944 1 parent 05337f6
Ravinder Rana authored March 31, 2010 josevalim committed March 31, 2010

Showing 1 changed file with 5 additions and 0 deletions. Show diff stats Hide diff stats

  1. 5  railties/lib/rails/commands/server.rb
5  railties/lib/rails/commands/server.rb
@@ -54,6 +54,11 @@ def start
54 54
       trap(:INT) { exit }
55 55
       puts "=> Ctrl-C to shutdown server" unless options[:daemonize]
56 56
 
  57
+      #Create required tmp directories if not found
  58
+      %w(cache pids sessions sockets).each do |dir_to_make|
  59
+        FileUtils.mkdir_p(Rails.root.join('tmp', dir_to_make))
  60
+      end
  61
+
57 62
       super
58 63
     ensure
59 64
       # The '-h' option calls exit before @options is set.

0 notes on commit db28d40

Please sign in to comment.
Something went wrong with that request. Please try again.