Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit db28d407f76a790a31e27bf51560e23425dd6944 1 parent 05337f6
@ravinderrana ravinderrana authored josevalim committed
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.
Please sign in to comment.
Something went wrong with that request. Please try again.