0

I am pulling my hair trying to figure out out to get the bake tool to work.

What i've done

Opened terminal and type in

cd ~

Then i've type in

vi .profile

Which already has the following contents

export PATH="$PATH:/Applications/MAMP/bin/php/php5.4.10/bin:/Applications/MAMP/cakephp/lib/Cake/Console/cake:$PATH"

Now when i go into the htdocs folder and type in terminal

cake bake sampleapp

I get the following message

zsh: command not found: cake

I'm not sure on how to troubleshoot this. Thank you for reading this :)

arkhamDev
  • 1,028
  • 1
  • 15
  • 32
  • What do you get when you type cake in terminal? Can cake be found? Problem seems to be related to your PATH at first sight. – Behlül Sep 22 '13 at 11:42
  • This is what i get: zsh: command not found: cake – arkhamDev Sep 22 '13 at 11:43
  • Search for cake executable in file manager or from terminal using `find` command. Then fix your path with the folder you get from searching. – Behlül Sep 22 '13 at 11:46
  • This is where it is and i've put in the exact value /Applications/MAMP/cakephp/lib/Cake/Console/cake – arkhamDev Sep 22 '13 at 12:05
  • I've tried to reload the .profile by typing . .profile but i get .: no such file or directory: .profile. When i do a ls -la i see the file – arkhamDev Sep 22 '13 at 12:06
  • You don't need the CakePHP path in there. PHP suffices. You just call it relativly then (`./Console/cake`). Also note, that your path is invalid, its just `.../Console` without the trailing "cake" - which is not a path, but a file. – mark Sep 22 '13 at 13:00
  • Hi Mark, my .profile file should be like this? export PATH="$PATH:/Applications/MAMP/bin/php/php5.4.10/bin:$PATH" and how do i access the cake bake tool? Thank you :) – arkhamDev Sep 22 '13 at 15:14

1 Answers1

0

Solved it :) I'm using zsh so i opened the config file like so:

vi .zshrc

Then i scrolled right to the bottom where there was paths set,

# Customize to your needs...
export PATH=$PATH:/path/to/cake/console/folder

You don't have to go right to the cake console, just the folder containing it should suffice.

Now i can access the cake console.

arkhamDev
  • 1,028
  • 1
  • 15
  • 32