문제

Can Any Body Suggest me how to bake the cake in CakePHP 2.x on linux

What I have tried

$ cd MyProject/app/Console 
$ ./cake bake

it give me this line, don't know how to proceed from here

Welcome to CakePHP v2.1.3 Console
---------------------------------------------------------------
App : Console
Path: /var/www/MyProject/app/Console/
---------------------------------------------------------------
What is the path to the project you want to bake?  
[/var/www/MyProject/app/Console/myapp] > 
도움이 되었습니까?

해결책

You're in the wrong path

When you do this:

$ cd /MyProject/app/Console
$ ./cake bake

You're launching the cake cli from inside the Console folder. That's not the right/normal way to execute the cake cli.

As is evident from the output, the cli thinks that you want to bake a new project in the Console folder because the path you are in, is not itself already a project. This changed some months ago, but in the version of cake you're using, the directory you are in, is assumed to be your app folder.

That said, ordinarily cake is used like this:

$ cd /MyProject/app
$ Console/cake bake

Welcome to CakePHP v2.3.6 Console
---------------------------------------------------------------
App : app
Path /var/www/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)

When already in an app folder - the bake command asks you what you want to create.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top