Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difficulty following the installation procedure #111

Open
starx opened this issue Jun 15, 2014 · 2 comments
Open

Difficulty following the installation procedure #111

starx opened this issue Jun 15, 2014 · 2 comments

Comments

@starx
Copy link

starx commented Jun 15, 2014

On the following step:

Create cache and assets directory with valid permissions.
php public/index.php assetic setup

It gives me followinig error

Zend Framework 2.3.1 application
Usage:

Reason for failure: Invalid arguments or no arguments provided

The instruction is vague, because I also ran that command as privileged user but same error. However, the vagueness is this, installing the module will not affect the public folder, I wonder how the index.php will take assetic setup as its parameters.

It would be a better idea to tell a manual way to create folders for this module to work and which permissions it requires 777 or 755

Most of the modules for zf2 use config folder inside a module but you guys want the config to be placed in configs directory. On a default skeleton application, there is a no configuration to autoload config from configs directory, only configs in autoload directory at project root autoloads file. The assetic.config.php has to be configured in Module.php probably.

I found the instruction very vague and should be addressed I think to be make this more easier to follow.

@sumanta-ghosh
Copy link

I also face the same problem like @starx .Usage of this module is very hard.Please explain it with very simple way so that everybody can understand it.

@fireflyfolio
Copy link
Contributor

I meet the same problem too. Try to follow these steps to resolve the above error.

1 - Add AsseticBundle into the application.config.file > modules like this :

'modules' => array(
     'Application',
     'AsseticBundle' // <= declare you want to use AsseticModule 
)

2 - Copy the assets.config.php.dist file from vendor/widmogrod/zf2-assetic-module/configs to the module where it will be used, for instance into module/Application/config, and rename it, for instance assets.config.php and remove the 'assetic_configuration' block to obtain this :

return array(
    // Use on production environment
    // 'debug'              => false,
    // 'buildOnRequest'     => false,
    // Use on development environment
    'debug' => true,
    'buildOnRequest' => true,
   ...
    ),
);

3 - Add the following line into the module.config.php file of Application module if you want to apply Assetic to that module :

    // Placeholder for console routes
    'console' => array(
        'router' => array(
            'routes' => array(
            ),
        ),
    ),
    'assetic_configuration' => require 'assets.config.php'

4 - Finally, try to run the command again :

php public/index.php assetic setup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants