mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 12:57:29 +08:00
Prevent errors in case #{rails_root}/tmp does not exist
Dir.mkdir is not recursive. i.e - It doesn't do the equivalent of `mkdir -p` but just plain `mkdir`. And that is a problem if #{rails_root}/tmp is missing. More here. http://meta.discourse.org/t/keep-getting-the-same-error-every-start/8214
This commit is contained in:
parent
a6b63b2871
commit
4fe6bee83c
|
@ -45,7 +45,9 @@ Bluepill.application("discourse", :base_dir => ENV["HOME"] + '/.bluepill') do |a
|
|||
app.uid = user
|
||||
|
||||
app.working_dir = rails_root
|
||||
sockdir = "#{rails_root}/tmp/sockets"
|
||||
tmpdir = "#{rails_root}/tmp"
|
||||
sockdir = "#{tmpdir}/sockets"
|
||||
File.directory? tmpdir or Dir.mkdir tmpdir
|
||||
File.directory? sockdir or Dir.mkdir sockdir
|
||||
num_webs.times do |i|
|
||||
app.process("thin-#{i}") do |process|
|
||||
|
|
Loading…
Reference in New Issue
Block a user