JeffreyWay / Laravel-4-Generators

Rapidly speed up your Laravel workflow with generators
https://packagist.org/packages/way/generators
MIT License
27 stars 9 forks source link

Followed instructions exactly, all I get is: GeneratorsServiceProvider' not found #340

Open oedipa opened 10 years ago

oedipa commented 10 years ago

After running the Composer update I get this when I run php artisan.

PHP Fatal error: Class 'Way\Generators\GeneratorsServiceProvider' not found in /var/www/laravel/bootstrap/compiled.php on line 4214 {"error":{"type":"Symfony\Component\Debug\Exception\FatalErrorException","message":"Class 'Way\Generators\GeneratorsServiceProvider' not found","file":"\/var\/www\/laravel\/bootstrap\/compiled.php","line":4214}}

laracasts commented 10 years ago

Try a composer-dumpautoload and try again. If that still doesn't work, check your vendor/ directory, and make sure that there's a Way folder within it.

oedipa commented 10 years ago

Ok, it never downloaded or installed to vendors. So I did composer dump-autoload and ran composer update again, still no dice. Only by running composer require way/generators and then answering the version question with 2.* did I get it to install. No idea why it wouldn't just install with the reference in my .json file. Thanks!

GabLeRoux commented 10 years ago

I had same issue, I changed "way/generators": "~3.0" for "way/generators": "dev-master" and it finally worked:

$ composer update
Loading composer repositories with package information
Initializing PEAR repository http://pear.horde.org
Updating dependencies (including require-dev)
  - Installing way/generators (dev-master fb4bc74)
    Downloading: 100%

Writing lock file
Generating autoload files
Generating optimized class loader

Not quite sure why it did not download at first. Thanks

Edit: nevermind, problem was that I had a typo in my composer.json. should be like this:

    "require-dev": {
        "way/generators": "dev-master"
    },
ayelen117 commented 9 years ago

You have to run: 1 - sudo composer clearcache 2 - sudo composer update

I hope this works out for you. Good luck!

khalilit commented 7 years ago

@GabLeRoux it works. thank you 👍