Reputation: 464
When i try baking with console ..
cake bake model
After choosing which table name and settings.. i got this error
Baking model class for Shop...
Creating file c:\xampp\htdocs\cakephp\app\Console\Model\Shop.php
Wrote `c:\xampp\htdocs\cakephp\app\Console\Model\Shop.php`
Fatal error: Class 'AppModel' not found in C:\xampp\htdocs\cakephp\lib\Cake\Model\CakeSchema.php on line 308
cake php version 2.1.3
Upvotes: 1
Views: 2663
Reputation: 11
Check if there is really the file AppModel.php in the app/Model folder (i accidentally deleted them). Then copy this file from a fresh cakephp-Version.
Upvotes: 1
Reputation: 464
ok solve it.. my bad..
what i did was. directly execute cake bake
from directory c:/location/apps/console
thus giving me the errors..
solution
need to add window environment variable PATH
value c:/location/apps/console
browse with command prompt to c:/location/apps
then execute the cake bake
from here
Upvotes: 0
Reputation: 1529
If you've migrated do you have a copy of AppModel.php in your app/Model directory. Same applies for AppHelper and AppController
see http://book.cakephp.org/2.0/en/appendices/2-1-migration-guide.html
Upvotes: 3