如何设置“蛋糕烘焙”环境用于多个应用程序?
我陷入了设置运行蛋糕烘烤的环境的困境。
在我的开发机器(使用 WAMP)中,我有几个应用程序:
/{wwwroot}
/myapp-1
/myapp-2
/myapp-3
根据一些在线教程,为了在命令提示符中使用“cake”,我必须添加“cake/console/”目录作为“PATH”环境变量。
因此,我将“{wwwroot}/myapp-1/cake/console”添加为“PATH”变量之一。
但问题是,当我要为“myapp-2”或“myapp-3”“烘焙”一些模型/控制器时,系统会说一些有关未找到数据库表之类的信息。
经过一些跟踪,我怀疑“蛋糕烘焙”正在使用“myapp-1”的“配置”,因为我在那里使用“蛋糕/控制台”。
那么,“蛋糕烘烤”多重应用环境的正确结构是什么?
非常感谢!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我会转到您相应的应用程序文件夹并直接引用蛋糕脚本。然后它应该使用正确的配置。
还有一个参数 -app 您可以使用它来指定您想要使用哪个应用程序。
I would go to your appropriate app folder and directly reference the cake script. It should then use the correct config.
there is also a parameter -app that you could use to specify which app you would like to use.