Runtime error using assetic w/ Symfony 2 on shared hosting

蹲街弑〆低调 提交于 2019-12-11 05:59:33

问题


I'm on ICDSoft hosting, so my directory structure looks like:

/
    private/
        app/
        bin/
        src/
        vendor/

    www/
        www/
            bundles/
            app.php

When I try running $ app/console assetic:dump I get the following runtime error:

[RuntimeException]
The source file "/home/thesewingdiva/private/app/../web/bundles/majorproductionssewingdivasite/js/jquery-1.8.3.min.js" does not exist.

Is there a way for me to tell assetic to look in ../www/www/bundles rather than ../web/bundles for the correct assets?


回答1:


In app/config/config.yml, in the assetic part :

assetic:
    ...
    read_from: "%kernel.root_dir%/../www/www"
    ...

AsseticBundle configuration documentaion for Symfony2 is here : http://symfony.com/doc/2.0/reference/configuration/assetic.html



来源:https://stackoverflow.com/questions/14218936/runtime-error-using-assetic-w-symfony-2-on-shared-hosting

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!