Reputation: 93
When I run cake bake all then I receive the error messages shown below. Is it my path?
Path on windows:
C:\wamp\bin\php\php5.3.5;C:\wamp\bin\mysql\mysql5.5.8\bin;C:\wamp\www\cakephp_bake\app\Console
Error message:
Welcome to CakePHP v2.0.6 Console
---------------------------------------------------------------
App : www
Path: C:\wamp\www\
---------------------------------------------------------------
Bake All
---------------------------------------------------------------
Warning Error: include_once(C:\wamp\www\Config\database.php): failed to open str
eam: No such file or directory in [C:\wamp\www\cakephp_bake\lib\Cake\Model\Conne
ctionManager.php, line 68]
Warning Error: include_once(): Failed opening 'C:\wamp\www\Config\database.php'
for inclusion (include_path='C:\wamp\www\cakephp_bake\lib;.;C:\php\pear') in [C:
\wamp\www\cakephp_bake\lib\Cake\Model\ConnectionManager.php, line 68]
Error: The datasource configuration "default" was not found in database.php
#0 C:\wamp\www\cakephp_bake\lib\Cake\Model\ConnectionManager.php(94): Connection
Manager::_getConnectionObject('default')
#1 C:\wamp\www\cakephp_bake\lib\Cake\Console\Command\Task\ModelTask.php(862): Co
nnectionManager::getDataSource('default')
#2 C:\wamp\www\cakephp_bake\lib\Cake\Console\Command\Task\ModelTask.php(800): Mo
delTask->getAllTables('default')
#3 C:\wamp\www\cakephp_bake\lib\Cake\Console\Command\Task\ModelTask.php(888): Mo
delTask->listAll('default')
#4 C:\wamp\www\cakephp_bake\lib\Cake\Console\Command\BakeShell.php(149): ModelTa
sk->getName('default')
#5 C:\wamp\www\cakephp_bake\lib\Cake\Console\Shell.php(386): BakeShell->all()
#6 C:\wamp\www\cakephp_bake\lib\Cake\Console\ShellDispatcher.php(177): Shell->ru
nCommand('all', Array)
#7 C:\wamp\www\cakephp_bake\lib\Cake\Console\ShellDispatcher.php(69): ShellDispa
tcher->dispatch()
#8 C:\wamp\www\cakephp_bake\app\Console\cake.php(41): ShellDispatcher::run(Array
)
#9 {main}
C:\wamp\www>
Let me know if I need to show anything else. Thanks.
Stackoverflow wouldn't allow me so much code so I typed this sentence to make the editor happy.
Upvotes: 0
Views: 6631
Reputation: 26421
Check you path
it is incorrect !
Change it to
C:\wamp\www\cakephp_bake\app\
(i.e. to your app directory)
from
C:\wamp\www\
Upvotes: 1