yeswework / fabrica-dev-kit

A toolkit for faster, smoother WordPress 5 development
https://fabri.ca/
MIT License
274 stars 27 forks source link

[Fabrica] ⚠️ Could not find dependency 'composer'. #3

Closed enguerranws closed 7 years ago

enguerranws commented 7 years ago

Hi,

I'm getting this issue trying to run ./setup.rb. [Fabrica] ⚠️ Could not find dependency 'composer'.

So I run composer -v, just to be sure, which logs : Composer version 1.4.1 2017-03-10 09:29:45

What do I miss?

tiojoca commented 7 years ago

Hey,

Are you using any virtual environment tool (rbenv, rvm, virtualenv, etc.)?

Do you get any error if you run if hash composer; then echo "ok"; fi in the command shell? What about ruby -e "puts 'ok' if system 'hash composer'"?

enguerranws commented 7 years ago

Hi,

Thanks for your help. Both of the commands you gave me return: composer: not found.

tiojoca commented 7 years ago

Thanks for trying that out. That's odd, hash composer should detect the executable if available. Can you try these two other alternative ways to see if they work in your system: if command -v composer; then echo 'ok'; else echo 'not found'; fi and if type composer >/dev/null; then echo 'ok'; fi

maxperei commented 7 years ago

hi there, same problem, you figured out what happen ?

enguerranws commented 7 years ago

@tiojoca The first command returns:

alias composer='php /usr/local/bin/composer.phar' ok

and the second returns:

ok

I'm guessing composer isn't available in my Ruby env?

maxperei commented 7 years ago

@enguerranws very good point, you should gem install composer and our problem is solved

andrewstaffell commented 7 years ago

@maxperei @enguerranws thanks for looking at this together – can you confirm if gem install composer does the trick?

enguerranws commented 7 years ago

Yes it does! I had to overwrite my previous install of composer with the Ruby Gem version. Thanks!

andrewstaffell commented 7 years ago

Great, good to get to the bottom of this.