I am using ubuntu and as per instruction I use 'apt-get isntall cakephp-scripts'
I am using latest stable release of cake v 2.2.1, but when I run cake bake -app , I always get console for v1.3.2
Why do I get CakePHP v1.3.2 Console on cakephp v 2.2.1
Instead of running
cake bake
directly run it fromcakeDir/app
by doingConsole/cake bake
. The thing is thatinstall cakephp-scripts
installs and old version of the cake scripts.Check your PATH variable in Linux, it might be pointing to an old version of cake
Go to your terminal
I think you will be able to use cake bake console with your cakePHP same version.
As the others already pointed out, CakePHP from the repositories is v1.3.2 which doesn't work with your 2.1.
After uninstalling (
sudo apt-get remove cakephp-scripts
) it, do the following:/usr/share/php/cakephp/
/usr/share/cakephp/
and all subfolders should be readable for everyone and/usr/share/cakephp/app/Console/cake
should be executable.Now link your executable from
/usr/bin/
:You should now be able to use the right version of the script everywhere from the console.
If you want to make the version of cake switchable comfortably, you should put the sources in a subfolder, i.e.
/usr/share/php/cakephp/2.1/
and link there:ln -s 2.1 current
. Now you can link from/usr/bin
to yourcurrent
directory:ln -s /usr/share/php/cakephp/current/app/Console/cake cake
. If you ever want to switch versions, the only thing you have to do is to change, wherecurrent
links to.