7

I've used CakePHP a few times before but this is the first time I'm trying out Bake. On my Mac I'm running CakePHP 1.3, PHP5.3.3, and MySQL. I've created my database tables and the app connects to the database.

I navigate to the console folder. and type ./cake

I get welcome to the CakePHP v.1.3.5 Console. Then I gives me a list of shells to run. It says

To run a command, type 'cake shell_name [args]'

I type:

cake bake all

and get

-bash: cake: command not found

Can someone help me out here? I'm not sure if I've missed something.

Jonesy

tereško
  • 58,060
  • 25
  • 98
  • 150
iamjonesy
  • 24,732
  • 40
  • 139
  • 206

1 Answers1

13

I have no experience with CakePHP but try prepending ./

./cake bake all
Repox
  • 15,015
  • 8
  • 54
  • 79
  • WOO! thanks. I'm not too clued up on bash stuff but this worked! – iamjonesy Oct 26 '10 at 10:29
  • Thanks it also help me. Can you please explain the ./ – pkk Nov 15 '16 at 14:42
  • 3
    @pkk Yes. Adding the `./` tells bash to use the file in the current directory. Without `./` bash will look for binaries in the `PATH` environment variable (which contains paths to `/usr/bin` and `/usr/local/bin` among others) and will therefore conclude that there's no `cake` executable in those directories and return `-bash: cake: command not found`. – Repox Nov 16 '16 at 11:34