Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby Build a Todo List Application with Rails 4 Build a Todo List Application with Rails 4 Write Our First Tests

Tong Vang
Tong Vang
9,926 Points

Syntax Error with "mkdir" using Windows

C:\Users\Tom\odot>mkdir -p spec/features/todo_lists
The syntax of the command is incorrect.

Why is my cmd line saying this?

Tong Vang
Tong Vang
9,926 Points

It seems I am not allowed to create subdirectory. How do I fix this?

1 Answer

Nick Fuller
Nick Fuller
9,027 Points

Hi Tong! (I'm assuming) You're using Windows and Ruby (Oh boy you're a brave soul!). It certainly is possible, but the few I know whom have tried end up with virtual machines!

The issue it seems is the file path structure. You're following the lessons on Treehouse (great idea) but they use Apple with OSX which is unix based. You're using Windows which is DOS based. The directory structure in DOS and OSX are different. DOS uses a backslash "\" and unix systems use a forward slash "/". It looks like you're trying to use a forward slash when you should use a backslash. Furthermore, I'm not sure if windows supports the -p flag (I don't know enough about DOS).

perhaps try mkdir spec\features\todo_lists