Skip to content

Commit

Permalink
Create tmp directories if required before starting server [#3907 stat…
Browse files Browse the repository at this point in the history
…e:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information
ravinderrana authored and josevalim committed Mar 31, 2010
1 parent 05337f6 commit db28d40
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions railties/lib/rails/commands/server.rb
Expand Up @@ -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.
Expand Down

0 comments on commit db28d40

Please sign in to comment.