Category Covered

cakephp bake on ubuntu

How to setup cakephp bake on ubuntu? Don’t worry just follow the instruction.

 

sudo apt-get install cakephp-scripts

 

Before doing that please make sure that your tmp directory in app is writable

 

1. sudo gedit /etc/environment

 

File will be opened with a text editor and with a content similar below for cakephp baking environment settings.

PATH=”/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games”

 

2. You need to append the path of your cake console and xampp bin to the PATH context.

 

Before:

PATH=”/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games”

After:

PATH=”/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games :/opt/lampp/bin:/opt/lampp/htdocs/cakephp/cake/console”

 

3. Save and close the edited file, press “Ctrl + S” then “Alt + F4”.

 

4. Go back to terminal window and enter the command. Note the space between the . (DOT) and /etc/

. /etc/environment

 

root@ecds-09-desktop:~# cd /opt/lampp/htdocs/cakephp/app
root@ecds-09-desktop:/opt/lampp/htdocs/cakephp/app# cake bake all

 

You will see the list of tables in the date base.

 

so select one of the table number shown in the left hand side then ENTER
cd /opt/lampp/htdocs/cakephp/app cake bake

 

It will bake your cakephp model, controller, and all views
So happy cakephp baking…

Source: cake bake in ubuntu