EastsideDev
EastsideDev

Reputation: 6639

Rails: files path

Theoretical question: If I'm making a directory Dir.mkdir('/test'), will this directory be created as /app/test or /public/test?

Upvotes: 0

Views: 149

Answers (1)

Matt
Matt

Reputation: 17629

It will be created as test under 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') or Dir.mkdir('public/test') respectively.

Upvotes: 1

Related Questions