Yii2 Gii model generator fails to load gii json file

Hi All,

Having issues generating a model from mysql table (table created by migration). This is a recent install of yii 2.0.6 (basic) on Ubuntu 14.04. Please see error below:


PHP Warning – yii\base\ErrorException


file_put_contents(/var/www/html/homely/website/runtime/gii-2.0.6/yii-gii-generators-model-Generator.json): failed to open stream: No such file or directory

[list=1]

[*] I’ve successfully generated a module, but models fail.

[*] Had a look in runtime/gii-2.0.5/ There is a json file for module generator but no file for model generator

[/list]

Any help greatly appreciated

Cheers

Ash

I’m also having same error when I’m trying to generate a model of a users table:


 PHP Warning – yii\base\ErrorException

file_put_contents(/var/www/virtual/domain/htdocs/frontend/runtime/gii-2.0.6/yii-gii-generators-model-Generator.json): failed to open stream: No such file or directory

in runtime folder there is no gii subfolder

Any ideas will be helpful

Turns out to be permissions. When you use GII - just 777 your runtime folder

In my case I already had permissions on folders set to 775, the issue was with the user that Apache was running.