4

LinuxのCakePHP 2.xでケーキを焼く方法を教えてください

私が試したこと

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

それは私にこの行を与えます、ここから先に進む方法がわかりません

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] > 
4

1 に答える 1

3

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.

于 2013-06-28T08:47:47.907 に答える