Make sure phalcon.sh is in the same dir as phalcon.php. What does this mean?

Hello. I'm getting this message when trying to create migration from my project's root folder(.phalcon is present):

$ Phalcon Developer Tools Installer
$ Make sure phalcon.sh is in the same dir as phalcon.php and that you are running this with sudo or as root.
$ Installing Devtools...
$ Working dir is: /Users/me/phalcon-devtools

However I do have phalcon.php and phalcon.sh in the same dir (~/phalcon-devtools) and I'm running my command as sudo:

MyProjectsRoot me$ sudo phalcon migration generate

I've also tried this command from app directory and after migrations folder manually created. I get the same message. Could you help to sort this out?

Ps. I'm running this on Osx



36.5k

Hi

The command line below is work yet ?

     phalcon commands

`

You can take look at https://github.com/phalcon/phalcon-devtools to re-install



6.7k
edited Sep '15

Hi, Thien, thanks for your response. I had to say that I got all this after seem to be succesfull installation of phalcon-devtools. Firstly I found phalcon commands works from my home directory only.. In .bash_profile I found this (same commands repeated several times):

export PTOOLSPATH=/Users/me/phalcon-devtools/
export PATH=$PATH:/Users/me/phalcon-devtoos
export PTOOLSPATH=/Users/me/phalcon-devtools/
export PATH=$PATH:/Users/me/phalcon-devtools
export PTOOLSPATH=/Users/me/phalcon-devtools/
export PATH=$PATH:/Users/me/phalcon-devtools
export PTOOLSPATH=/Users/me/phalcon-devtools/
export PATH=$PATH:/Users/me/phalcon-devtools

After removing this rows phalcon commans works from every location (it returns Phalcon DevTools (2.0.0) ans so on.

I found that each time I run sudo phalcon migration generate something adds two export commans to my bash_profile.

I've tried phalcon migration generate as a wild guess and got this:

Notice: Use of undefined constant APP_DIR - assumed 'APP_DIR' in /Users/me/Documents/Aptana Studio 3 Workspace/MyProject/app/config/config.php on line 7
Call stack...

then the same message for HOST_DIR.

and finally

Error: Cannot load database configuration

Should I define all constants and database connectivity settings in config.php for migration script to work?

Why devtools altering my .bash_profile, given that I've added devtoools dir to $PATH myself prefiously?



6.7k
edited Sep '15

Finally got migrations to work, when placed database settings to config.php They were stored in services.php, my bad. Maybe I don't understand something but I find error message from my first post confusing. It's not true at least for mac you shoudn't run migration with sudo.