Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cakephp shell :Shell class HelloShell could not be found

Tags:

shell

cakephp

I am a newer to cakephp .I config the cakephp shell as the cakephp handbook says,when I run the HelloShell with the command cake Hello ,I got the error information as follows:

Error: Shell class HelloShell could not be found.
1#G:\htdocs\cakedemo\lib\Cake\Console\ShellDispatcher.php(191):ShellDispatcher>_getShell('hello')
2#G:\htdocs\cakedemo\lib\Cake\Console\ShellDispatcher.php(69):ShellDispatcher->dispatch()
3#G:\htdocs\cakedemo\app\Console\cake.php(33):ShellDispatcher::run(Array)  {main}

my cakephp version :

Welcome to CakePHP v2.2.0-beta Console

App : Console

Path: G:\htdocs\cakedemo\app\Console\

anyone who is helpful can give me a advice,plea.

like image 449
LiveJin Avatar asked May 20 '12 07:05

LiveJin


1 Answers

there is your mistake. you should always be in your APP path to execute the cake console.

...app/>../lib/Cake/Console/cake MyShell

or (using the APP Console folder):

...app/>Console/cake MyShell

and MyShell should then be in ...app/Console/Command/. Thats all there is to it.

like image 135
mark Avatar answered Nov 04 '22 07:11

mark