discourse/discourse — pull request #1169 by phanimahesh (2013-07-09 12:17:12+00:00)
Title: 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