CakePHP 错误:未找到模型 Aco 的数据库表 acos
我在工作和家里都有一台运行 Mac OS X Leopard 的 Mac,在工作中也有一台 PC。
我目前正在所有 3 台计算机上设置项目,它在我的工作计算机上运行良好,但在我的家用 Mac 上我收到标题中的错误。该项目位于 SVN 上,所以我刚刚检查了它,为我的数据库模式运行了 SQL 脚本,并设置了我在工作数据库中拥有的相同用户,但它仍然无法工作。
我还按照其他具有类似问题的帖子中的建议清除了缓存文件夹,但它仍然无法工作。
显然我已经检查了数据库表并且它存在于我的数据库中。有人知道可能发生什么情况吗?
I have a Mac running Mac OS X Leopard at work as well as at home and a PC at work as well.
I have the project I'm currently working on set up on all 3, it works fine at my work computers but on my home Mac I get the error in the title. The project is on SVN so I just checked it out ran the SQL script for my DB schema and set up the same user I have in my work DB and it will not work still.
I also cleared out the cache folders as suggested in other posts with a similar problem and it still won't work.
Obviously I have checked the database table and it is present in my DB. Anyone have any other clues as to what might be happening?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
最后错误出在我的数据库用户配置中。我似乎忘记为用于访问数据库的用户设置 CRUD 权限,这就是给我带来错误的原因
In the end the error was in my database user configuration. It seems I forgot to set CRUD permissions to the user I use to access the database and that's what gave me the error
如果您未处于调试模式,我建议您这样做以帮助排除故障。如果它在调试模式下工作,那么您就会遇到某种缓存问题。如果它在调试模式下不起作用,我的下一个问题是 - 您的工作计算机是 Windows 吗?如果是这样,我会考虑区分大小写的问题,因为 Windows 和 Mac 处理大小写的方式不同。
If you aren't in debug mode, I would suggest doing that to help troubleshoot. If it works in debug mode, then you've got some sort of caching issue. If it doesn't work in debug mode, my next question is - are your work computers windows? If so, I would look at case-sensitivity issues because Windows and Macs handle case differently.
刚刚遇到同样的错误。表创建在 shell 中工作得很好,因此之后无法读取它似乎很可疑。
就我而言,修复方法是清空缓存/tmp 文件夹,如 this french 上的建议论坛。
Just encountered the same error. Table creation worked fine from the shell, so it seemed dubious that it wouldn't be able to read it afterwards.
In my case, the fix was to empty cache / tmp folder, as suggested on this french forum.