FileLoaderLoadException: Cannot load resource "."

Azam Alvi picture Azam Alvi · Apr 4, 2014 · Viewed 7.4k times · Source

I am working on Symfony2.I am using SVN. So the problem is that my code was working fine.When I commit the code and I update in another Laptop and run the code then it gives me the error like this

FileLoaderLoadException: Cannot load resource "."

When I clear the cache then I got this error

 [Symfony\Component\Config\Exception\FileLoaderLoadException]
 Cannot load resource ".".

I don't figure it out what the actual problem is. I install the assets by this command

php app/console assets:install web

but still the same problem.How can I resolve this error.

routing.yml

admin:
    resource: '@SonataAdminBundle/Resources/config/routing/sonata_admin.xml'
    prefix: /admin

_sonata_admin:
    resource: .
    type: sonata_admin
    prefix: /admin

sonata_user:
    resource: '@SonataUserBundle/Resources/config/routing/admin_security.xml'
    prefix: /admin

sonata_user_security:
    resource: "@SonataUserBundle/Resources/config/routing/sonata_security_1.xml"

sonata_user_resetting:
    resource: "@SonataUserBundle/Resources/config/routing/sonata_resetting_1.xml"
    prefix: /resetting

sonata_user_profile:
    resource: "@SonataUserBundle/Resources/config/routing/sonata_profile_1.xml"
    prefix: /profile

sonata_user_register:
    resource: "@SonataUserBundle/Resources/config/routing/sonata_registration_1.xml"
    prefix: /register

sonata_user_change_password:
    resource: "@SonataUserBundle/Resources/config/routing/sonata_change_password_1.xml"
    prefix: /profile


gallery:
    resource: '@SonataMediaBundle/Resources/config/routing/gallery.xml'
    prefix: /media/gallery

media:
    resource: '@SonataMediaBundle/Resources/config/routing/media.xml'
    prefix: /media

Answer

Alexandre picture Alexandre · Dec 9, 2014

Have you submit folder cache ? (you must not)

I use SVN in my project when I deploy always I launch

svn update 
cache:clear --env=prod
assets:install 
assetic:dump 

And it's good (you can use phing to computerize)