Closed (fixed)
Project:
Module Builder
Version:
7.x-2.x-dev
Component:
Drush support
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Jul 2013 at 15:25 UTC
Updated:
4 Aug 2013 at 06:51 UTC
Hi, when I try to add the command --write I get the following errors:
PHP Fatal error: Class 'ModuleBuilderGeneratorApi' not found in /var/www/html/sites/all/modules/module_builder/includes/generators/ModuleBuilderGenerators.inc on line 142
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Class 'ModuleBuilderGeneratorApi' not found in
/var/www/html/sites/all/modules/module_builder/includes/generators/ModuleBuilderGenerators.inc,
line 142
It works when I just run "drush mb mymodule init"
Any help or suggestions are appreciated. :)
Comments
Comment #1
joachim commentedCould you check if you have the includes/generators/ModuleBuilderGeneratorAPI.inc file?
I'm a bit confused as to how your code can be referring to it, yet be missing it. It's definitely been committed to git!
Comment #2
gbirch commentedI'm getting exactly the same error. Installed the module just this evening from drupal.org.
Environment: Ubuntu 12.04. PHP 5.3. Drush 5.9 (installed via PEAR).
"module_builder" directory is in /home/[user]/.drush
The includes/generators/ModuleBuilderGeneratorAPI.inc file is present and readable.
Using the option combination: "--build=code --write" works just fine--no error.
Using the option combination: "--build=api --write" reproduces the error.
So does: "--build=api" even when "--write" is omitted.
Comment #3
joachim commentedOh wait. What systems are you guys on?
The class and the file are called ModuleBuilderGeneratorAPI.
The generator name is: 'api' => 'api',
The autoloader tries to load ModuleBuilderGeneratorApi.inc, which on OS X appears to be ok loading ModuleBuilderGeneratorAPI.inc
But I seem to remember that OS X is case-preserving, but not case-sensitive for filenames.
Comment #4
joachim commentedFixed it -- I think.
Try the latest dev.
Comment #5
gbirch commentedFix works for me. Thank you! Just by the way, I'm not sure how the process works, but your changes are only available on the git repo -- they haven't made it to drupal.org/project/module_builder yet.
Comment #6
joachim commentedThe -dev release tarballs are only updated once or twice daily I think.
Thanks for reporting back!
Comment #7
cfgregory commentedPerfect! Thanks for the fast reply and fix.
Comment #8
joachim commented