Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Phalcon Dev Tools - Builder doesn't knows where is the models directory

Tags:

phalcon

I'm getting "Builder doesn't knows where is the models directory" error when I run the phalcon all-models command in both Command Line and Phalcon Webtools.

Please let me know what am I missing?

Web ToolsCommand line

My webtools.config.php content

define('PTOOLS_IP', '216.174.134.2');
define('PTOOLSPATH', '/var/www/html/vendor/phalcon/devtools');

My webtools.php content

use Phalcon\Web\Tools;

require 'webtools.config.php';
require PTOOLSPATH . '/scripts/Phalcon/Web/Tools.php';

Tools::main(PTOOLSPATH, PTOOLS_IP);

My config.ini content

[database]
adapter  = Mysql
host     = localhost
username = test
password = test
dbname   = test

[application]
controllersDir = ../app/controllers/
modelsDir      = ../app/models/
viewsDir       = ../app/views/
pluginsDir     = ../app/plugins/
libraryDir     = ../app/library/
cacheDir       = ../app/cache/
baseUri        = /

[models]
metadata.adapter = "Memory"

I have change the modelsDir from ../app/models/ to /../app/models/ but still not working.


ANSWER FOUND:


Going to project root directory and type the command (instructions)

# phalcon all-models --directory /var/www/html/projec_name

I speficied the --directory which is the Base path on which project will be created.

Thank you colburton for helping me debug this problem. Much appreciated.

like image 860
Tuyen Nguyen Avatar asked Oct 21 '22 07:10

Tuyen Nguyen


2 Answers

Going to project root directory and type the command (instructions)

# phalcon all-models --directory /var/www/html/projec_name

I speficied the --directory which is the Base path on which project will be created.

Thank you colburton for helping me debug this problem. Much appreciated.

like image 144
Tuyen Nguyen Avatar answered Jan 02 '23 20:01

Tuyen Nguyen


In the options array you pass to the builder you need to add 'modelsDir' with the correct path.

On this page you can find a video with the webtools. There is a tab for "Configuration", where you can set them.

It is also located in the config.ini under app/config

like image 31
colburton Avatar answered Jan 02 '23 19:01

colburton