Closed Lugia101101 closed 10 years ago
Are you including vendor/autoload.php in chat-server.php?
This? require dirname(DIR) . '/vendor/autoload.php'; If so, yes.
Can you post the code to your chat-server.php and Chat.php?
I got the same error..
according to this: http://stackoverflow.com/questions/16868942/ratchet-basic-chat-application-giving-error-failed-opening-required
"php composer.phar update" helped
btw someone should write exactly filestructure to the hello world app, it is not explicitly given where should be chat-server located.. it should be easy to write down:
appfolder/composer.json appfolder/bin/chat-server.php appfolder/src/MyApp/Chat.php
btw, i am referring to tutorial from here: http://socketo.me/docs/hello-world
Thank you scholtz, the update command fixed it. I might suggest you add a little note about using the update command after editing composer.json as well.
I'm out of town for four days. When I get back I'll update the website documentation with the recently revised way (composer require cboden/ratchet
) to install a package as well as a tree structure.
Thanks a lot. I have the same problem. When I execute php composer.phar update
, I fixed it.
My folder tree: ➜ ws tree -L 3 . ├── bin │ └── chat-server.php ├── composer.json ├── composer.lock ├── composer.phar ├── MyApp.php ├── src │ └── MyApp │ └── Chat.php └── vendor ├── autoload.php ├── cboden │ └── ratchet ├── composer │ ├── autoload_classmap.php │ ├── autoload_namespaces.php │ ├── autoload_psr4.php │ ├── autoload_real.php │ ├── ClassLoader.php │ └── installed.json ├── evenement │ └── evenement ├── guzzle │ ├── common │ ├── http │ ├── parser │ └── stream ├── react │ ├── event-loop │ ├── socket │ └── stream └── symfony ├── event-dispatcher ├── http-foundation └── routing
22 directories, 13 files
Heyo, I have followed every step of the Hello World! tutorial, but can't get past Instantiation. I run it through the command prompt and the following error appears:
File tree and composer.json can be found here: http://pastebin.com/xEDwVBg0 Just wondering if I missed something or interpreted something wrong. Thank you~