exception - Class yii\debug\Module does not exist -


i trying run yii2 application on vagran virtual machine. provison use ansible. here ansible playbook file:

--- - hosts: vagrant   sudo: true   tasks: - name: 1. install apache   apt: name=apache2 state=present  - name: 1.1 delete temporary file   file: path=/var/www/web/index.html state=absent  - name: 2. install php module apache   apt: name=php5 state=latest update_cache=yes  - name: 3. install php gd library   apt: name=php5-cli state=latest  - name: 4. start apache   service: name=apache2 state=running enabled=yes  - name: 5. install mysql   apt: pkg=mysql-server state=present  - name: 6. install python-mysqldb   apt: pkg=python-mysqldb state=present  - name: 7. install php mysql bindings   apt: pkg=php5-mysql state=present  - name: 8. restart apache   service: name=apache2 state=restarted  - name: 9. set mysql root password   debconf: name='mysql-server' question='mysql-server/root_password' value='password' vtype='password'  - name: 10. confirm mysql root password before installing   debconf: name='mysql-server' question='mysql-server/root_password_again' value='password' vtype='password'  - name: 11. database creation name gitsearch    mysql_db: name=gitsearch state=present  - name: 12.a copy database dump   copy: src=../gitsearch.sql.bz2 dest=/tmp/gitsearch.sql.bz2   - name: 12.b copy database dump   mysql_db: name=gitsearch state=import target=/tmp/gitsearch.sql.bz2  - name: 13. ensure curl installed   apt: pkg=curl state=installed   when: ansible_os_family == 'debian'  - name: 14. install composer current directory   shell: >     curl -ss https://getcomposer.org/installer | php     creates=/usr/local/bin/composer  - name: 15. install php5-curl   apt: name=php5-curl state=latest update_cache=yes  - name: 16. move composer globally-accessible location.   shell: >     mv composer.phar /usr/local/bin/composer     creates=/usr/local/bin/composer  - name: 18. update dependencies v2   composer: command=install working_dir=/var/www 

when run project have exception:

reflectionexception  class yii\debug\module not exist in /var/www/vendor/yiisoft/yii2/di/container.php 

i think problem composer, because before provision gets composer tasks fine. on local machine (not vagrant box) fine too. debugger section in config:

$config['modules']['debug']['class'] = 'yii\debug\module'; $config['modules']['debug']['allowedips'] = ['*'];  

looks debug module and/or gii modules aren't installed.

please check composer.json file in root of yii2 project, , make sure following lines present in require-dev section of composer file: "yiisoft/yii2-debug": "~2.0" , "yiisoft/yii2-gii": "~2.0".

then run composer update in root of ptoject.

if not problem, you're running application wrong permissions.

happy coding!


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -