0
votes

I am stuck in setting up environment for running cake bake.

In my development machine (using WAMP), I have several applications:

/{wwwroot}
    /myapp-1
    /myapp-2
    /myapp-3

According to some tutorial online, in order to use 'cake' in command prompt, I have to add 'cake/console/' directory as 'PATH' environment variable.

Therefore, I add '{wwwroot}/myapp-1/cake/console' as one of the 'PATH' variables.

But the problem is, when I am going to 'cake bake' some models/controllers for 'myapp-2' or 'myapp-3', the system said something about database table not found and a like.

After some tracing, I suspect that the 'cake bake' is using the 'config' of 'myapp-1' because I am using the 'cake/console' there.

So, what is the proper structure of the environment 'cake bake' multiple applications?

Many thanks!

1

1 Answers

0
votes

I would go to your appropriate app folder and directly reference the cake script. It should then use the correct config.

../cake/console/cake bake

there is also a parameter -app that you could use to specify which app you would like to use.