You use Dir.mkdir to create directories, like so:
Dir.mkdir("mynewdir")
Once the directory has been created you can navigate to it with Dir.chdir.
You can specify absolute paths to create directories under other specific directories:
Dir.mkdir("/mynewdir") Dir.mkdir("c:\test")
You cannot create directories under directories that don't yet exist themselves.
To create an entire structure of directories, you must create them one by one from the top down.