Theoretical question: If I’m making a directory Dir.mkdir(‘/test’), will this directory be created as /app/test or /public/test?
Theoretical question: If I’m making a directory Dir.mkdir(‘/test’), will this directory be created as
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It will be created as
testunder the root path (/) of your filesystem because you’re specifying an absolute path (and most likely it will fail because of permission problems).Use
Dir.mkdir('app/test')orDir.mkdir('public/test')respectively.