3

我正在研究 Symfony2。我正在使用 SVN。所以问题是我的代码工作正常。当我提交代码并在另一台笔记本电脑上更新并运行代码时,它给了我这样的错误

FileLoaderLoadException: Cannot load resource "."

当我清除缓存时,我收到了这个错误

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

我不知道实际问题是什么。我通过这个命令安装资产

php app/console assets:install web

但仍然是同样的问题。我该如何解决这个错误。

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
4

1 回答 1

0

你提交文件夹缓存了吗?(你不能)

我总是在启动时在我的项目中使用 SVN

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

而且很好(可以phing用来电脑化)

于 2014-12-09T16:45:41.730 回答