Skip to content
Browse files

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

…e:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
1 parent 05337f6 commit db28d407f76a790a31e27bf51560e23425dd6944 @ravinderrana ravinderrana committed with josevalim
Showing with 5 additions and 0 deletions.
  1. +5 −0 railties/lib/rails/commands/server.rb
View
5 railties/lib/rails/commands/server.rb
@@ -54,6 +54,11 @@ def start
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.

0 comments on commit db28d40

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