Question

I'm pretty new to CakePHP and i'm running through both the Cake Book and the Apress Book CakePHP from novice to professional, but i can't seem to understand what's going on on my bake console.

I've got it installed and seems to work fine. But when i type in cake bake it shows me this

Welcome to CakePHP v2.0.0 Console
--------------------------------------------------------------------
App: htdocs
Path: W:\xampp\htdocs\
--------------------------------------------------------------------
What is the path to the project you want to bake?
[W:\xampp\htdocs\myapp] >

instead of what the books say it should be

---------------------------------------------------------------
App : app
Path: /path-to/project/app
---------------------------------------------------------------
Interactive Bake Shell
---------------------------------------------------------------
[D]atabase Configuration
[M]odel
[V]iew
[C]ontroller
[P]roject
[F]ixture
[T]est case
[Q]uit
What would you like to Bake? (D/M/V/C/P/F/T/Q)
>

if i follow the questions on my cake console, it asks me the path to the directory layout i wish to copy, and then seems to override everything i have with that skel one.

on the other hand, if i follow the book's steps and type cake bake view or cake bake model it seems to understand that i'm talking about projects named view and model and tell me there's no database configuration for those projects, etc. So, if i type the project path first, i don't get to choose what to do. But if i leave it out, it has no way of knowing. See where this is going?

I'm using the regular Windows cmd.exe, not cygwin as i've seen some people recommending, and can provide more detail if needed. There's probably an easy solution for this, so I appreciate your help!

Was it helpful?

Solution

you are in the wrong path. If you want to bake internal stuff (models, controllers, views, ...) etc you need to navigate to the app folder and execute cake there (or define your app path with -app)

details and hot tip for windows: http://www.dereuromark.de/tag/cake-console-windows/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top