terra-ops / terra-cli

The Terra Command Line Interface
http://terra.readthedocs.org
GNU General Public License v2.0
48 stars 17 forks source link

Installing via Composer global fails #25

Closed ghost closed 7 years ago

ghost commented 9 years ago

I am using the Vagrant file you provided to test this in isolation. The Vagrant box contains all required softwares as described in Vagrantfile.

When I execute the command

composer global require terra/terra-app:dev-master

Terra is installed in the ~/.composer/vendor directory however when I do

php ~/.composer/vendor/terra/terra-app/terra

I get this error

#Error
PHP Fatal Error: Class 'terra\Console\Application' not found in /home/vagrant/.composer/vendor/terra/terra-app/terra on line 22.

But if I manually download the app via git clone there isn't any problem.

git clone git@github.com:terra-ops/terra-app.git
cd terra-app
composer update
php terra

It shows the normal commands.

My guess, the autoload provided by composer not doing its job? I heard psr0 is obsolete now, changing it to psr4 would do the trick?

ennenine commented 9 years ago

I believe this may be a duplicate (or at least very closely related to) of #16

jonpugh commented 9 years ago

The paths that the /bin/terra file were looking for the autoloader were wrong.

Please try the composer global require method again and let me know if it works for you, @rajibmp !

Thanks, Jon

ghost commented 7 years ago

sorry I couldn't test at that time as I was testing some deployment platforms and somehow I forgot to update... IIRC I manually updated the path to autoloader for it to work.

Now, the project have developed a lot and I expect it to be working fine. I'll clone and run it in near future and if I find any bug i'll create new issue. So, closing this for now. :-)