The error message indicates it's looking for your database file in the wrong place:
> Failed opening 'c:\wamp\www\myappname\app\Console\Config\database.php'
As evident from:
> c:\wamp\www\myappname\app\The docs indicate:
$ cd /path/to/cakephp/app $ Console/cake
Therefore try:
> c:\wamp\www\myappname\app>Console\cake bake all
AD
On Wednesday, 20 November 2013 07:13:16 UTC+1, Victor Musvibe wrote:
I am using cakephp 2.x and im trying Code Generation with Bake. When i try to cake bake all. Below are the errors i am getting in command line.I have posted this question on http://stackoverflow.com/questions/20079795/cakephp- , im just hoping to get a quicker response here.cli-error I am using cakephp 2.x and im trying Code Generation with Bake. When i try to cake bake all. Below are the errors i am getting in command line.Microsoft Windows [Version 6.1.7601]Copyright (c) 2009 Microsoft Corporation. All rights reserved.C:\Users\victorm>cd c:\wamp\www\myappname\app\Console c:\wamp\www\myappname\app\Console>cake bake all Welcome to CakePHP v2.4.2 Console------------------------------------------------------------ --- App : ConsolePath: c:\wamp\www\myappname\app\Console\ ------------------------------------------------------------ --- Bake All------------------------------------------------------------ --- Warning Error: include_once(c:\wamp\www\myappname\app\Console\Config\ database.php): failed to open stream: No such file or directory in [C:\wamp\www\myappname\lib\ Cake\Model\ConnectionManager. php, line 69] Warning Error: include_once(): Failed opening 'c:\wamp\www\myappname\app\Console\Config\database.php' for inclusion (include_path='C:\wamp\www\ myappname\lib;.;C:\php5\pear') in [C:\wamp\www\myappname\lib\ Cake\Model\ConnectionManager. php, line 69] Error: The datasource configuration "default" was not found in database.php#0 C:\wamp\www\myappname\lib\Cake\Model\ConnectionManager. php(93): Connection Manager::_getConnectionObject('default') #1 C:\wamp\www\myappname\lib\Cake\Console\Command\Task\ ModelTask.php(929): ConnectionManager:: getDataSource('default') #2 C:\wamp\www\myappname\lib\Cake\Console\Command\Task\ ModelTask.php(866): ModelTask->getAllTables(' default') #3 C:\wamp\www\myappname\lib\Cake\Console\Command\Task\ ModelTask.php(955): ModelTask->listAll('default') #4 C:\wamp\www\myappname\lib\Cake\Console\Command\ BakeShell.php(152): ModelTask->getName('default') #5 C:\wamp\www\myappname\lib\Cake\Console\Shell.php(433): BakeShell->all() #6 C:\wamp\www\myappname\lib\Cake\Console\ShellDispatcher. php(209): Shell->runCommand('all', Array) #7 C:\wamp\www\myappname\lib\Cake\Console\ShellDispatcher. php(68): ShellDispatcher->dispatch() #8 C:\wamp\www\myappname\app\Console\cake.php(37): ShellDispatcher::run(Array) #9 {main}c:\wamp\www\myappname\app\Console> Does anyone have an idea on how to fix this?
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment