user3161830
user3161830

Reputation: 3

RatChet PHP File structure and Installation issue

I am a beginner in programming trying to implement Ratchet.

This is my current file structure

D:\Xampp
composer.phar
htdocs
      Ratchet
             composer.json
             bin
                Chat.php
             src
                Chat-Server.php

And I ran the command

php composer.phar install --dev

The following error message appears

Composer could not find a composer.json file in D:\xampp
To initialize a project, please create a composer.json file as described in the
http://getcomposer.org/ "Getting Started" section

I tried using

 php composer.phar --working-dir=htdocs/Ratchet update

But it still doesn't work. The tutorial on Ratchet is not very clear either, can someone guide me on what I should do next?

Upvotes: 0

Views: 562

Answers (1)

Schwierig
Schwierig

Reputation: 712

This kind of duplicates this question: Updating the composer.phar on Symfony2

Though to answer it:

You need to run composer.phar in the directory in which your composer.json lies, so the correct execution path would be the Ratchet directory with this command:

../../composer.phar install --dev

Upvotes: 1

Related Questions