Skip to content


Subversion checkout URL

You can clone with
Download ZIP

Some gotchas

franzem edited this page · 7 revisions

Some Gotchas

Just thought I would share these little learning for anyone trying to adopt Capcake:

  1. Your Git repository starts from the app folder. So, if your Git repo started for whole project including Cakephp you need to start a new repo

  2. Add a folder called system to webroot. You also need to put a file into the folder so that git will take the empty folder into version control (stay with Cakephp convention, call file 'empty'). Capcake tries to symlink this folder and errors if it isn't present. UPDATE: according to Jadb, "The webroot/system directory is used by capcake when you run "deploy:web:disable" and "deploy:web:enable" and puts up a maintenance page for long deploys / db migrations."

  3. Git add . and Git commit -m "Note", git push -u origin master into Github (yes, you need a Github account, or your repo needs to be publicly accessible from the server you are deploying to).

  4. when you run cap deploy:setup, cap eventually prompts you for you local database settings. Not entirely sure why it does this, considering the amount of manual configuration to come. Vim database.php would do the same, but anyway, this is how things work

  5. One of your settings in deploy.rb is cake_path. Capcake cleverly get the latest version of Cakephp from the git repo and installs it here for you. Say you choose /var/www/cakephp

  6. To make your app Live, make a symbolic link from your webroot to the current folder like this:

    ln -s /[deploy here]/current/webroot /var/www/html/[sitename]

  7. This won't work because your app won't be able to find Cake, so modify app/webroot/index.php so:

    define('CAKE_CORE_INCLUDE_PATH', '/var/www/cakephp');

  8. If you have any errors don't hesitate to look in /var/www/httpd/error.log for a wealth of help

You should now be able to access your site using http:/yourUrl/sitename

Something went wrong with that request. Please try again.