OverFlow636 / phpantry

Project for managing your groceries and pantry inventory.
5 stars 4 forks source link

How to run? #2

Open lgommans opened 5 years ago

lgommans commented 5 years ago

Hi! While there are no screenshots and the demo is broken, this project seems to be exactly what I'm looking for.

The instructions to run the application are a little unclear. I'm not familiar with CakePHP, but should be able to figure it out with some pointers.

I cloned the repository and installed cakephp (apt install cakephp, giving me version 2.8.5). When running cake schema create in the phpantry directory, it reports:

$ cake schema view Config/Schema/schema.php 

Welcome to CakePHP v2.8.5 Console
---------------------------------------------------------------
App : Cake
Path: /usr/share/php/Cake/
---------------------------------------------------------------
Cake Schema Shell
---------------------------------------------------------------
Error: Plugin Config/Schema/schema could not be found.
#0 /usr/share/php/Cake/Model/CakeSchema.php(127): CakePlugin::path('Config/Schema/s...')
#1 /usr/share/php/Cake/Model/CakeSchema.php(97): CakeSchema->build(Array)
#2 /usr/share/php/Cake/Console/Command/SchemaShell.php(93): CakeSchema->__construct(Array)
#3 /usr/share/php/Cake/Console/Shell.php(450): SchemaShell->startup()
#4 /usr/share/php/Cake/Console/ShellDispatcher.php(212): Shell->runCommand('view', Array)
#5 /usr/share/php/Cake/Console/ShellDispatcher.php(66): ShellDispatcher->dispatch()
#6 /usr/share/php/Cake/Console/cake.php(54): ShellDispatcher::run(Array)
#7 {main}

It appears to be looking in the wrong place (not the current working directory, but some /usr/share/php/Cake directory). I tried various ways of specifying the current path or the schema file in Config/schema, but to no avail. I also tried to move the application to /usr/share/php/Cake, also to no avail.

How should I setup the application?

Thanks!

OverFlow636 commented 5 years ago

Hello, Unfortunately i never got around to building this out more. The existing code may work, but ive forgotten what state i left it in.

For running it, there may be an incompatibility of the cake cli version that is preventing it from finding the schema file which is here https://github.com/OverFlow636/phpantry/blob/master/Config/Schema/schema.php

If you create this db manually, you may be able to run it then, however im not sure why the schema command is not working, it did 8 years ago when i made the instructions :(

lgommans commented 5 years ago

Alright, thanks for replying!