I’m sure it is not a permissions issue cause it actually can create some directories.
Example:
FileUtils.mkdir "/tmp/foo"
works well
but
FileUtils.mkdir "/tmp/bar/foo"
fails with error
Errno::ENOENT: No such file or directory - /tmp/bar/foo
which does ot make sense to me cause i know it does not exists and that’s why i want to create it.
you need
FileUtils.mkdir_p "/tmp/bar/foo"mkdir_pbehaves exactly asmkdir -pon UNIXes – if some dir does not exists it will be created.I bet there are no
/tmp/bardir and Ruby fails to create a dir into an non-existing folder.